/* ================================================== */
/* === BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Poppins', sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding-bottom: 80px;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================================== */
/* === PAGE WRAPPER & MAIN === */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 140px;
}
main { flex: 1; }

/* ================================================== */
/* === FOOTER === */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    padding: 12px 0;
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    font-size: 0.9rem;
    border-top: 3px solid #e91e63;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}
.footer p { margin: 0; font-weight: 500; }

/* ================================================== */
/* === HEADER - NUEVO Y CORREGIDO === */
.header {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
}

/* Logo + texto */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
.logo-img {
    height: 64px;
    width: auto;
    transition: transform 0.3s ease;
}
.logo-link:hover .logo-img {
    transform: scale(1.1);
}
.logo-text {
    margin-left: 12px;
    font-size: 1.9rem;
    font-weight: 700;
    color: #222;
}

/* Menú horizontal (escritorio) */
.nav {
    display: flex;
    gap: 28px;
    align-items: center;
}
.nav a {
    color: #444;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.2s;
}
.nav a:hover { color: #e91e63; }
.btn-logout {
    background: #e91e63;
    color: white !important;
    padding: 1px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Badge de mensajes sin leer */
.unread-badge {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 6px;
    background: #999;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 10px;
    vertical-align: middle;
}
.unread-badge.has-messages {
    display: inline-flex;
    background: #e91e63;
}
.unread-badge-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 8px;
    background: #999;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 10px;
}
.unread-badge-mobile.has-messages {
    background: #e91e63;
}

/* Botón de mensajes en header (visible siempre) */
.header-actions {
    display: none; /* Oculto en PC */
    align-items: center;
    gap: 8px;
}
.header-message-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #444;
    font-size: 1.2rem;
    border-radius: 50%;
    transition: all 0.2s;
    text-decoration: none;
}
.header-message-btn:hover {
    background: #f5f5f5;
    color: #e91e63;
}
.header-unread-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #999;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.header-unread-badge.has-messages {
    background: #e91e63;
}

/* Icono de mensaje en el menú nav (PC y móvil) */
.nav-message-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #444;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.2s;
    padding: 5px 8px;
}
.nav-message-link i {
    font-size: 1.1rem;
}
.nav-message-link:hover {
    color: #e91e63;
}
.unread-badge {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #e91e63 !important;
    color: white !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Badge en menú móvil */
.unread-badge-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 8px;
    background: #e91e63;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 10px;
}

/* Botón hamburguesa */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #333;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}
.menu-toggle:hover {
    background: #f0f0f0;
}

/* Menú móvil desplegable */
.nav-mobile {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    z-index: 999;
}
.nav-mobile.open {
    max-height: 500px;
}
.nav-mobile a {
    padding: 16px 20px;
    width: 100%;
    text-align: center;
    color: #444;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid #eee;

}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover {
    background: #fdf2f8;
    color: #e91e63;
}

/* Versión específica para menú móvil */
.nav-mobile .btn-logout {
    margin: 10px 16px;           /* Mantengo el margen vertical y lateral moderado */
    display: block;
    width: calc(100% - 32px);   /* ← Lo clave: ocupa todo el ancho menos los márgenes laterales */
    text-align: center;         /* Centra el texto "Salir" */
    box-sizing: border-box;     /* Asegura que padding no desborde */
}


/* Responsive: activar menú hamburguesa */
@media (max-width: 1024px) {
    .nav { display: none; }
    .menu-toggle { display: block; }
    .nav-mobile { display: flex; }
    .header-actions { display: flex; }
}
@media (max-width: 480px) {
    .header-container { padding: 0 16px; }
    .logo-img { height: 56px; }
    .logo-text { font-size: 1.65rem; }
    .menu-toggle { font-size: 1.8rem; }
    .header-message-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    .header-unread-badge {
        min-width: 16px;
        height: 16px;
        font-size: 0.65rem;
    }
}

/* ================================================== */
/* === HERO SIMPLE === */
.hero-simple {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    text-align: center;
    padding: 25px 0 3px;
    margin-bottom: 20px;
    border-radius: 18px;
    margin-top: 10px;
    margin-left: 10px;    
    margin-right: 10px;
}
.hero-title { font-size: 2rem; font-weight: 700; margin-bottom: 8px; margin-top: -5px; }
.hero-subtitle { font-size: 1.3rem; opacity: 0.95; margin-top: -5px; }

/* ================================================== */
/* === GRIDS === */
.pets-section { padding: 35px 0; }
.pets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin: 0 auto;
}
@media (max-width: 1024px) { .pets-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pets-grid { grid-template-columns: repeat(3, 1fr); } }

.stats-section {
    padding: 30px 0 20px;
    background: #fdf8f5;
    margin-bottom: 1px;
}
.stats-grid {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 25px;
    margin-top: -13px;
}
.stat-card {
    background: white;
    border-radius: 20px;
    padding: 18px 24px;
    min-width: 180px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}
.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1;
}
.stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.stat-card.total { border-left: 5px solid #ffb74d; }
.stat-card.total .stat-number { color: #f57c00; }
.stat-card.total .stat-icon { background: rgba(255,183,77,0.2); color: #f57c00; }
.stat-card.lost { border-left: 5px solid #ef5350; }
.stat-card.lost .stat-number { color: #c62828; }
.stat-card.lost .stat-icon { background: rgba(239,83,80,0.2); color: #c62828; }
.stat-card.found { border-left: 5px solid #66bb6a; }
.stat-card.found .stat-number { color: #2e7d32; }
.stat-card.found .stat-icon { background: rgba(102,187,106,0.2); color: #2e7d32; }




/* ================================================== */
/* === TARJETAS MASCOTAS === */
.pet-card {
    background: white;
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.pet-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.16);
}

.pet-image-container {
    position: relative;
    width: 100%;
    height: 380px;                    /* Altura fija para uniformidad */
    background: #ffffff;              /* Fondo neutro suave para las "barras" */
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;                    /* Espacio interno para que no toque los bordes */
    box-sizing: border-box;
}

.pet-image {
    width: 100%;
    height: 100%;
    object-fit: cover;         /* <-- Lo clave: llena todo y recorta */
    object-position: center ;   /* Centra la imagen (prioriza la parte central) */
    border-radius: 18px 18px 0 0
    
}


.pet-info { padding: 16px; }
.pet-name { font-size: 1.1rem; color: #e91e63; margin:0 0 8px; font-weight:600; }
.pet-location, .pet-date { font-size: 0.8rem; margin: 4px 0; display:flex; align-items:center; gap:6px; }

pet-footer {
    margin-top: 12px;
    display: flex;
    flex-direction: column;     /* Apila uno debajo del otro */
    align-items: flex-start;    /* ¡CLAVE! Todo alineado a la izquierda */
    gap: 10px;                  /* Espacio entre el texto y el botón */
}
.status-tag {
    position: absolute;
    top:18px;
    right:18px;
    padding:8px 16px;
    font-size:0.85rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:0.8px;
    color:white;
    border-radius:50px;
    z-index:999;
    box-shadow:0 3px 8px rgba(0,0,0,0.3);
    min-width:90px;
    text-align:center;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    pointer-events:none;
}
.status-tag.lost { background:#e91e63; border:2px solid #c2185b; }
.status-tag.found { background:#4caf50; border:2px solid #388e3c; }

/* ================================================== */
/* === BOTONES === */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1.1rem;
}
.btn-block { width: 100%; padding:16px 32px; }
.btn-primary { background:#e91e63; color:white; padding:14px 20px; border-radius:30px; font-weight:600; font-size:0.95rem; transition:all 0.2s ease; outline: none; border: none; }
.btn-primary:hover { background:#c2185b; transform:translateY(-1px); box-shadow:0 6px 16px rgba(233,30,99,0.3); }
.btn-danger { background:#e91e63; color:white; }
.btn-danger:hover { background:#c2185b; }
.btn-found { background:#4caf50; color:white; font-size:0.8rem; padding:12px 12px; border-radius:8px; }
.btn-small { font-size:0.75rem; padding:6px 10px; }
.btn-contact { padding: 10px 20px; font-size: 0.85rem; border-radius: 30px !important; background: #e91e63; color: white; border: none; cursor: pointer; transition: background 0.3s; }
.btn-contact:hover { background:#c2185b; }

/* Ajustes para el texto del dueño */
.owner-name {
    font-size: 0.8rem;
    color: #555;
    text-align: left;                  /* Centrado (opcional, queda más limpio) */
    display: block;
}

/* ================================================== */
/* === FORMULARIOS === */
.form-container {
    max-width:500px;
    margin:40px auto;
    background:white;
    padding:32px;
    border-radius:20px;
    box-shadow:0 8px 25px rgba(0,0,0,0.1);
}
.form-container h2 { font-size:1.8rem; color:#e91e63; text-align:center; margin-bottom:12px; }
.form-container p { text-align:center; color:#666; margin-bottom:24px; }
.form-group { margin-bottom:20px;}/* Cuidadin */
.form-group label { display:block; margin-bottom:8px; font-weight:600; color:#444; }
.form-group input, .form-group textarea, .form-group select {
    width:100%;
    padding:12px 16px;
    border:2px solid #ddd;
    border-radius:12px;
    font-size:1rem;
    transition:border 0.3s;
    background: white;
    color: #333;
    flex-shrink: 0;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { 
    outline:none; 
    border-color:#e91e63; 
}

/* ================================================== */
/* === CUSTOM FILE UPLOAD === */
.custom-file-upload { position:relative; display:block; margin:12px 0; }
#photo-input { position:absolute; opacity:0; width:0.1px; height:0.1px; overflow:hidden; z-index:-1; }
.file-label {
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,#e91e63,#c2185b);
    color:white;
    padding:14px 20px;
    border-radius:16px;
    font-weight:600;
    font-size:1rem;
    cursor:pointer;
    transition:all 0.3s ease;
    box-shadow:0 6px 16px rgba(233,30,99,0.3);
    text-align:center;
    width:100%;
    max-width:320px;
    margin:0 auto;
}
.file-label:hover { background:linear-gradient(135deg,#c2185b,#ad1457); transform:translateY(-2px); box-shadow:0 10px 20px rgba(233,30,99,0.4); }
.file-label:active { transform:translateY(0); }
.file-label.selected { background:linear-gradient(135deg,#4caf50,#388e3c); box-shadow:0 6px 16px rgba(76,175,80,0.3); }
.file-label.selected:hover { background:linear-gradient(135deg,#388e3c,#2e7d32); box-shadow:0 10px 20px rgba(76,175,80,0.4); }
.file-label.selected .file-text::before { content:"Foto lista "; }

/* ================================================== */
/* === PAGINACIÓN, ALERTS, MODALS, ETC. === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    background: white;
    color: #555;
    border: 1.5px solid #ddd;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.page-btn:hover:not(.disabled) {
    background: #f8f9fa;
    border-color: #e91e63;
    color: #e91e63;
    transform: translateY(-1px);
}
.page-btn.active {
    background: #e91e63;
    color: white;
    border-color: #e91e63;
    box-shadow: 0 4px 12px rgba(233,30,99,0.3);
}
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; color: #aaa; }
.page-btn.prev, .page-btn.next { font-weight: 600; min-width: 100px; }

button, a, input, textarea, select, .btn, .btn-primary, .btn-block, .btn-contact, .page-btn,
.custom-file-upload label, input[type="file"]::file-selector-button {
    outline: none !important;
    box-shadow: none !important;
}
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, .btn:focus-visible, .page-btn:focus-visible {
    outline: 2px solid #e91e63 !important;
    outline-offset: 2px !important;
    border-radius: 8px !important;
}

.search-filter { margin: 32px 0 24px; text-align: center; }
.search-form { display: flex; justify-content: center; align-items: center; gap: 12px; max-width: 100%; margin: 0 auto; padding: 0 16px; flex-wrap: nowrap; }
.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2.5px solid #e2e8f0;
    border-radius: 20px;
    height: 48px;
    flex: 1;
    min-width: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 0 30px;
    overflow: hidden;
    transition: none;
}
.search-input-group, .search-input-group:focus-within, .search-input:focus {
    border-color: #e2e8f0 !important;
    outline: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}
.search-input-group svg { width: 22px; height: 22px; color: #94a3b8; flex-shrink: 0; margin-right: 12px; }
.search-input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 500;
    color: #1e293b;
    flex: 1;
    min-width: 0;
    height: 100%;
    caret-color: #e91e63;
}
.search-input::placeholder { color: #94a3b8; font-size: 1.05rem; }
.clear-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #cbd5e1;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 50%;
    margin-left: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.clear-search:hover { color: #e91e63; background: rgba(233, 30, 99, 0.12); }
.btn-search {
    background: #e91e63;
    color: white;
    border: none;
    padding: 0 28px;
    height: 60px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.25);
    flex-shrink: 0;
    outline: none;
}
.btn-search:hover { background: #c2185b; }

.alert {
    padding:14px 20px;
    margin-bottom:16px;
    border-radius:12px;
    font-size:0.95rem;
    font-weight:500;
    display:flex;
    align-items:center;
    gap:10px;
    color:white;
    background:#e91e63;
    box-shadow:0 6px 16px rgba(233,30,99,0.3);
}
.alert.success { background:#4caf50; box-shadow:0 6px 16px rgba(76,175,80,0.3); }
.alert.error { background:#e91e63; box-shadow:0 6px 16px rgba(233,30,99,0.3); }

.modal {
    position:fixed;
    top:0; left:0;
    width:100%;
    height:100%;
    display:none;
    align-items:center;
    justify-content:center;
    background:rgba(0,0,0,0.6);
    z-index:2000;
}
.modal.active { display:flex; }
.modal-content {
    background:white;
    padding:28px;
    border-radius:20px;
    max-width:500px;
    width:90%;
    position:relative;
    box-shadow:0 12px 28px rgba(0,0,0,0.2);
}
.modal-close {
    position:absolute;
    top:16px; right:16px;
    background:none;
    border:none;
    font-size:1.4rem;
    cursor:pointer;
    color:#e91e63;
    font-weight:700;
}

.table-wrapper { overflow-x:auto; width:100%; margin-bottom:32px; }
.table {
    width:100%;
    border-collapse:collapse;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 6px 18px rgba(0,0,0,0.08);
}
.table th, .table td { padding:14px 18px; text-align:left; font-size:0.95rem; }
.table th { background:#e91e63; color:white; font-weight:600; }
.table tr:nth-child(even) { background:#f7f7f7; }
.table tr:hover { background:#f1e4f2; }

.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity:0; width:0; height:0; }
.slider {
    position:absolute;
    cursor:pointer;
    top:0; left:0; right:0; bottom:0;
    background:#ccc;
    transition:.4s;
    border-radius:26px;
}
.slider:before {
    position:absolute;
    content:"";
    height:22px;
    width:22px;
    left:2px;
    bottom:2px;
    background:white;
    transition:.4s;
    border-radius:50%;
}
input:checked + .slider { background:#e91e63; }
input:checked + .slider:before { transform:translateX(24px); }

.tooltip { position: relative; display:inline-block; cursor: pointer; }
.tooltip .tooltiptext {
    visibility: hidden;
    width: max-content;
    background-color:#333;
    color:#fff;
    text-align:center;
    padding:6px 12px;
    border-radius:8px;
    position:absolute;
    z-index:100;
    bottom:125%;
    left:50%;
    transform:translateX(-50%);
    opacity:0;
    transition: opacity 0.3s;
    font-size:0.8rem;
}
.tooltip:hover .tooltiptext { visibility: visible; opacity:1; }

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #e91e63;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: auto;
}



/* Contenedor que posiciona el botón dentro del input */
.password-container {
    position: relative;
    width: 100%;
}

/* El input: padding derecho para dejar espacio al botón */
.password-input {
    width: 100% !important;
    padding: 12px 50px 12px 16px !important;  /* ← 50px a la derecha para el ojo */
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
}

/* Botón del ojo: posicionado dentro a la derecha */
.toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.toggle-password:hover {
    color: #e91e63;
    background: rgba(233, 30, 99, 0.15);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}







/* Cuando está "visible", oculta los caracteres como puntos (pero permite copiar/pegar) */
.password-visible {
    -webkit-text-security: none;   /* Safari/Chrome iOS y Android */
    /*text-security: none;           /* Firefox futuro / estándar */
    /* Para navegadores que no soportan text-security, usamos font fallback */
    font-family: 'text-security-disc'; /* Si tienes una fuente personalizada */
}

.text-center {
    margin-top: -10px;     /* ← Sube el texto 20px (ajusta el valor: -30px, -40px, etc.) */
  
}










.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 0 0 12px 12px;
    display: none;
}

.autocomplete-list div {
    padding: 12px 14px;
    cursor: pointer;
}

.autocomplete-list div:hover {
    background: #f8f8f8;
}

.error-message {
    color: #e91e63;
    font-size: 0.85rem;
    margin-top: 6px;
    min-height: 1.2em;
    font-weight: 500;
}

/* En móvil ocultar lista personalizada */
@media (max-width: 1024px) {
    .autocomplete-list { display: none !important; }
}





/* FILTROS COMPACTOS */
.filter-form {
    background: white;
    padding: 18px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    margin-bottom: 36px;
    margin-top: -60px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    align-items: end;
}

.filter-item.has-icon .input-wrapper {
    position: relative;
}

.filter-item.has-icon .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
    z-index: 2;
}

.filter-item.has-icon input {
    padding-left: 44px !important;
    text-align: left !important;
}

.filter-item input {
    text-align: left;
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
}

.filter-item input::placeholder {
    text-align: left;
    color: #aaa;
}

.filter-item input:focus {
    outline: none;
    border-color: #e91e63;
}



/* === AQUÍ LA CORRECCIÓN PARA LAS ETIQUETAS === */
.filter-item label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #444;
    text-align: left !important;
}

.btn-search-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px !important;
    font-size: 1.05rem;
    width: 100%;
}

.btn-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    color: #e91e63;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}



    /* Mover el icono dentro del input */
    .filter-item.has-icon .input-wrapper {
        position: relative;
    }

    .filter-item.has-icon .input-icon {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        color: #aaa;
        pointer-events: none;
        z-index: 2;
    }

    /* Padding izquierdo para que el texto no tape el icono + texto a la izquierda */
    .filter-item.has-icon input {
        padding-left: 40px !important;   /* Más espacio para el icono */
        text-align: left !important;    /* ← Texto a la izquierda */

    }

    /* Placeholder también a la izquierda */
    .filter-item.has-icon input::placeholder {
        text-align: left !important;
 
        color: #aaa;
    }


    /* ========================================================================== */
    /* ESCRITORIO: Subir Estado y el botón Buscar (alineados más arriba)         */
    /* ========================================================================== */
@media (max-width: 1024px) {
    /* Sube el tercer campo (Estado) y el cuarto (Botón Buscar) */
    .filters-grid > .filter-item:nth-child(3),  /* Estado */
    .filters-grid > .filter-item:nth-child(4)   /* Botón Buscar */
  
    {
        position: relative;
        top: -23px;        /* ← Sube 20 píxeles (ajusta si quieres más/menos) */
    }

    /* Texto a la izquierda */
    .filter-item input[type="text"] {
        text-align: left !important;
        direction: ltr !important;
    }

    .filter-item input[type="text"]::placeholder {
        text-align: left !important;
        direction: ltr !important;
        text-overflow: ellipsis;
    }

}

/* ========================================================================== */
/* MÓVIL: Todo alineado como siempre, sin ningún desplazamiento              */
/* ========================================================================== */
@media (max-width: 1024px) {
    /* Reseteamos cualquier posición relativa que pudiera afectar */
    .filter-item {
        position: static !important;
        top: auto !important;
    }
}


      .filter-form {
        margin-top: 10px;
}

/* Icono dentro del input */
.filter-item.has-icon .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
    z-index: 2;
}

/* Botón Buscar */
.button-item .btn-search-filter {
    height: 46px !important;
    width: 100%;
    padding: 0 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.05rem;
    box-sizing: border-box;
    
}

/* Limpiar filtros */
.btn-clear {
    margin-top: 8px;
}




/* ========================================================================== */
/* MÓVIL: diseño original, todo alineado sin desplazamientos extra            */
/* ========================================================================== */
@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .filter-item .input-wrapper {
        height: 52px;
    }

    .filter-item input[type="text"] {
        height: 52px !important;
        padding: 0 14px 0 46px;
        font-size: 1rem;
    }

    .button-item .btn-search-filter {
        height: 52px !important;
        font-size: 1.1rem;
    }

    /* En móvil NO movemos nada → todo queda como estaba */
    .filter-item {
        position: static;
        top: auto;
    }
}








@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ================================================== */
/* === RESPONSIVE GENERAL (sin romper el header) === */
@media (max-width: 1024px) {
    .container { padding:0 15px; }
    .hero-title { font-size:1rem; }
    .hero-subtitle { font-size:1.2rem; }
    .pets-grid { grid-template-columns:1fr 1fr; gap:24px; }
    .pet-image-container { height:380px; }
    .form-container { max-width:90%; margin:30px auto; padding:28px; }
    .btn-primary, .btn-block { padding:14px 28px; font-size:1rem; }
}

@media (max-width: 1024px) {
    .pets-grid { grid-template-columns:1fr; gap:20px; }
    .pet-image-container { height:380px; padding:10px; }
    .pet-info { padding:10px; margin-bottom:10px; }
    .pet-name { font-size:1.1rem; }
    .stats-section { padding:20px 0 16px; margin-bottom:-60px; }
    .stats-grid { gap:20px; overflow-x:hidden; }
    .stat-card { padding:10px 12px; min-width:90px; max-width:180px; border-radius:16px; flex:1; }
    .stat-label { font-size:0.68rem; margin-bottom:4px; letter-spacing:0.4px; }
    .stat-number { font-size:1.5rem; margin:0; }
    .stat-icon { display:none; }
    .hero-title { font-size:1.2rem; margin-top:-15px; margin-bottom:1px; }
    .hero-subtitle { font-size:0.9rem; margin-bottom:10px }
    .form-container { max-width:95%; padding:24px; }
    .form-container h2 { font-size:1.6rem; }
    .form-group input, .form-group textarea, .form-group select { padding:12px 14px; font-size:1rem; }
    .pet-footer { gap: 10px; }
    .pet-footer .btn-found, .pet-footer .btn-danger { padding:14px 20px; font-size:0.95rem; border-radius:12px; min-height:48px; width:100%; }
   /* .pet-footer { flex-direction:column; gap:12px; align-items:stretch; margin-top:1px; padding:0 12px; } */
    .btn-found { background:#4caf50; color:white; box-shadow:0 2px 8px rgba(76,175,80,0.3); margin:8px 1px; width:100%; padding:14px 20px; font-size:0.95rem; border-radius:12px; min-height:48px; }
    .btn-small, .btn-danger { background:#e91e63; color:white; box-shadow:0 2px 8px rgba(233,30,99,0.3); margin:8px 1px; width:100%; padding:14px 20px; font-size:0.95rem; border-radius:12px; min-height:48px; }
}

@media (max-width: 480px) {
    .pets-grid { grid-template-columns:1fr; }
    .pet-image-container { height:380px; padding:8px; }
    .pet-name { font-size:1rem; }
    .pet-location, .pet-date { font-size:0.75rem; }
    .status-tag { top:16px; right:16px; padding:4px 10px; font-size:0.7rem; min-width:65px; }
    .form-container { padding:20px; margin:20px auto; }
    .form-container h2 { font-size:1.5rem; }
    .form-group label { font-size:0.95rem; }
    .form-group input, .form-group textarea, .form-group select { padding:11px 13px; font-size:0.95rem; }
    .btn, .btn-primary, .btn-block { padding:14px 24px; font-size:0.95rem; }
    .alert { padding:10px 12px; font-size:0.9rem; }
    .page-wrapper { padding-bottom:90px; }
    .footer { height:65px; padding:10px 0; font-size:0.8rem; }
    .stat-card { min-width:80px; max-width:100px; padding:8px 10px; }
    .stat-number { font-size:1.4rem; }
    .stat-label { font-size:0.65rem; }
    .btn-found { padding:14px 20px; font-size:0.95rem; border-radius:12px; min-height:48px; }
    .btn-small, .btn-danger { padding:14px 20px; font-size:0.95rem; border-radius:12px; min-height:48px; }
    .page-btn { min-width: 38px; height: 38px; font-size: 0.85rem; }
    .page-btn.prev, .page-btn.next { min-width: 80px; font-size: 0.8rem; }
}

/* ================================================== */
/* === FIN === */

/* Estilos para dashboard */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.btn-report {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    padding: 16px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.35);
}

.btn-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.45);
    background: linear-gradient(135deg, #d81b60 0%, #ad1457 100%);
}

.alerts-title {
    margin-top: 40px;
    margin-bottom: 24px;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
}

.pet-description {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pet-image-container {
    position: relative;
    overflow: hidden;
}

.edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pet-image-container .found-message {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(100, 149, 237, 0.9) !important;
    color: white;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    z-index: 10;
}

.edit-overlay span {
    background: rgba(233, 30, 99, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
}

.pet-image-container:hover .edit-overlay {
    opacity: 1;
}

@media (max-width: 1024px) {
    .pet-image-container.editable .edit-overlay {
        opacity: 1;
        background: rgba(233, 30, 99, 0.15);
    }
}

.pet-footer {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.pet-footer .btn-found,
.pet-footer .btn-danger {
    flex: 1;
    padding: 14px 20px;
    font-size: 0.95rem;
    border-radius: 12px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.pet-footer .btn-found {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.pet-footer .btn-found:hover {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.pet-footer .btn-danger {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

.pet-footer .btn-danger:hover {
    background: linear-gradient(135deg, #d81b60 0%, #ad1457 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

@media (max-width: 1024px) {
    .welcome-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-report {
        width: 100%;
        justify-content: center;
    }
}