/* ===== SISTEMA DE SOLICITUDES DE CONTACTO - MOBILE FIRST ===== */
/* Optimizado: 28/11/2025 - Código limpio sin duplicaciones */

:root {
    --sol-primary: #007bff;
    --sol-success: #28a745;
    --sol-warning: #ffc107;
    --sol-danger: #dc3545;
    --sol-info: #17a2b8;
    --sol-light: #f8f9fa;
    --sol-dark: #343a40;
    --sol-radius: 8px;
    --sol-shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --sol-shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --sol-transition: all 0.2s ease;
}

/* ===== CONTAINER PRINCIPAL ===== */
.solicitudes-container {
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,249,250,0.95));
    border-radius: var(--sol-radius);
    box-shadow: var(--sol-shadow-lg);
    min-height: 500px;
    overflow: hidden;
}

/* ===== FILTROS ===== */
.filters-section {
    padding: 15px 20px;
    background: rgba(248,249,250,0.8);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== FILTROS SOLICITUDES - MOBILE FIRST ===== */
.filtros-solicitudes {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.filtros-btns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
    max-width: 400px;
}

.filtro-btn {
    padding: 6px 8px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.filtro-btn i {
    font-size: 0.85rem;
}

.contador-filtro {
    font-weight: 700;
    opacity: 0.9;
}

/* Colores por estado - Inactivo (outline) */
.filtro-todas {
    background: white;
    color: #6c757d;
    border-color: #adb5bd;
}

.filtro-pendiente {
    background: white;
    color: #856404;
    border-color: #ffc107;
}

.filtro-aceptada {
    background: white;
    color: #155724;
    border-color: #28a745;
}

.filtro-rechazada {
    background: white;
    color: #721c24;
    border-color: #dc3545;
}

/* Colores por estado - Activo (filled) */
.filtro-todas.active {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.filtro-pendiente.active {
    background: #ffc107;
    color: #000;
    border-color: #ffc107;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.filtro-aceptada.active {
    background: #28a745;
    color: white;
    border-color: #28a745;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.filtro-rechazada.active {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Hover effects */
.filtro-btn:hover:not(.active) {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.filtro-todas:hover:not(.active) { background: #e9ecef; }
.filtro-pendiente:hover:not(.active) { background: #fff3cd; }
.filtro-aceptada:hover:not(.active) { background: #d4edda; }
.filtro-rechazada:hover:not(.active) { background: #f8d7da; }

/* Focus visible para accesibilidad */
.filtro-btn:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Tablet (576px+) */
@media (min-width: 576px) {
    .filtros-solicitudes {
        padding: 10px 12px;
    }
    
    .filtros-btns {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }
    
    .filtro-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Desktop (768px+) */
@media (min-width: 768px) {
    .filtros-solicitudes {
        padding: 12px 16px;
    }
    
    .filtros-label {
        font-size: 0.85rem;
    }
    
    .filtro-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .filtro-btn i {
        font-size: 1rem;
    }
}

/* ===== ESTADÍSTICAS - GRID COMPACTO ===== */
#container-estadisticas {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.stat-item {
    text-align: center;
    padding: 12px 6px;
    border-radius: 10px;
    color: white;
}

.stat-item .stat-icon {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 4px;
}

.stat-item .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-item .stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.9;
    margin-top: 4px;
    letter-spacing: 0.3px;
}

/* Colores de stats con gradientes */
.stat-primary { background: linear-gradient(135deg, #007bff, #0056b3); }
.stat-warning { background: linear-gradient(135deg, #ffc107, #e0a800); color: #212529; }
.stat-success { background: linear-gradient(135deg, #28a745, #1e7e34); }
.stat-danger { background: linear-gradient(135deg, #dc3545, #c82333); }

/* Fila de métricas */
.metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.metric-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.metric-header {
    background: #f8f9fa;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.metric-header i {
    margin-right: 6px;
    color: var(--sol-primary);
}

.metric-body {
    padding: 12px;
    text-align: center;
}

.progress-wrapper {
    background: #e9ecef;
    border-radius: 20px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-custom {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    transition: width 0.5s ease;
}

.progress-bar-custom span {
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
}

.metric-big-number {
    font-size: 2rem;
    font-weight: 700;
    color: #28a745;
    line-height: 1;
    margin-bottom: 4px;
}

.metric-desc {
    font-size: 0.7rem;
    color: #6c757d;
}

/* Card de tips */
.tips-card {
    background: linear-gradient(135deg, #17a2b8, #138496);
    border-radius: 10px;
    overflow: hidden;
}

.tips-header {
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.tips-header i {
    margin-right: 6px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 10px;
}

.tips-grid span {
    font-size: 0.65rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
}

.tips-grid span i {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ===== LISTA DE SOLICITUDES ===== */
.solicitudes-list {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sol-primary) var(--sol-light);
}

.solicitudes-list::-webkit-scrollbar {
    width: 6px;
}

.solicitudes-list::-webkit-scrollbar-track {
    background: var(--sol-light);
}

.solicitudes-list::-webkit-scrollbar-thumb {
    background: var(--sol-primary);
    border-radius: 3px;
}

/* ===== TARJETAS DE SOLICITUDES (Recibidas y Enviadas) ===== */
.solicitud-card,
.card.solicitud-enviada {
    background: white;
    border-radius: var(--sol-radius);
    box-shadow: var(--sol-shadow-sm);
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    overflow: hidden;
    transition: var(--sol-transition);
    opacity: 0;
    transform: translateY(20px);
}

.solicitud-card.animate__animated,
.card.solicitud-enviada.animate__animated {
    opacity: 1;
    transform: translateY(0);
}

.solicitud-card:hover,
.card.solicitud-enviada:hover {
    box-shadow: var(--sol-shadow-lg);
    transform: translateY(-2px);
}

.solicitud-card .card-body,
.card.solicitud-enviada .card-body {
    padding: 16px;
}

.solicitud-card hr,
.card.solicitud-enviada hr {
    margin: 12px 0;
    opacity: 0.2;
}

/* Bordes de estado para solicitudes recibidas */
.solicitud-card.border-warning { border-left: 4px solid var(--sol-warning); }
.solicitud-card.border-success { border-left: 4px solid var(--sol-success); }
.solicitud-card.border-danger { border-left: 4px solid var(--sol-danger); }
.solicitud-card.border-secondary { border-left: 4px solid #6c757d; }

/* Tipografía de tarjetas */
.solicitud-card h6,
.card.solicitud-enviada h6 {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.3;
    font-weight: 600;
    color: #212529;
}

.solicitud-card p.small,
.card.solicitud-enviada p.small {
    font-size: 0.875rem;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #495057;
}

.solicitud-card p.small strong,
.card.solicitud-enviada p.small strong {
    color: #212529;
    font-weight: 600;
}

/* Mensaje preview */
.solicitud-card .mensaje-preview,
.card.solicitud-enviada .mensaje-preview {
    font-size: 0.875rem;
    color: #495057;
    font-style: italic;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 8px 0;
    padding: 6px 0;
    display: block;
}

/* Imagen thumbnail */
.solicitud-card .animal-thumbnail,
.card.solicitud-enviada .animal-thumbnail {
    width: 90px !important;
    height: 90px !important;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: var(--sol-shadow-sm);
}

/* Borde izquierdo de estado */
.solicitud-card {
    border-left-width: 4px !important;
}

/* Borde azul para solicitudes enviadas */
.card.solicitud-enviada {
    border-left: 4px solid #0d6efd !important;
}

/* Estado y fecha */
.solicitud-card .text-end,
.card.solicitud-enviada .text-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
}

.solicitud-card .text-end .badge,
.card.solicitud-enviada .text-end .badge {
    margin-bottom: 6px;
    font-size: 0.75rem;
    padding: 3px 8px;
    font-weight: 600;
}

.solicitud-card .text-end small,
.card.solicitud-enviada .text-end small {
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Botones de acción */
.solicitud-card .d-flex.justify-content-end,
.card.solicitud-enviada .d-flex.justify-content-end {
    gap: 0.5rem;
    flex-wrap: wrap;
}

.solicitud-card .btn,
.card.solicitud-enviada .btn {
    white-space: nowrap;
}

/* ===== HEADER DE SOLICITUD (Vista detallada) ===== */
.solicitud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--sol-light);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.animal-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.animal-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: var(--sol-shadow-sm);
    flex-shrink: 0;
}

.animal-details {
    min-width: 0;
    flex: 1;
}

.animal-details h6 {
    margin: 0;
    font-size: 1rem;
    color: var(--sol-dark);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.animal-details small {
    color: #666;
    font-size: 0.85rem;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== BADGES DE ESTADO ===== */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.status-pendiente {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-respondida {
    background: rgba(40, 167, 69, 0.2);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-archivada {
    background: rgba(108, 117, 125, 0.2);
    color: #495057;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

/* ===== BODY DE SOLICITUD ===== */
.solicitud-body {
    padding: 15px;
}

.solicitante-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    padding: 8px;
    background: rgba(248,249,250,0.5);
    border-radius: 6px;
    border-left: 3px solid var(--sol-primary);
}

.info-item i {
    width: 16px;
    color: var(--sol-primary);
    flex-shrink: 0;
}

.info-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mensaje-content {
    background: rgba(248,249,250,0.8);
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid var(--sol-primary);
    margin: 15px 0;
}

.mensaje-content p {
    margin: 8px 0 0 0;
    line-height: 1.5;
    color: var(--sol-dark);
}

.mensaje-content strong {
    color: var(--sol-primary);
    font-weight: 600;
}

.fecha-solicitud {
    font-size: 0.85rem;
    color: #666;
    text-align: right;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* ===== ACCIONES DE SOLICITUD ===== */
.solicitud-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 15px;
    background: rgba(248,249,250,0.5);
    border-top: 1px solid rgba(0,0,0,0.1);
}

.btn-action {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--sol-transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    text-decoration: none;
}

.btn-action:focus {
    outline: 2px solid var(--sol-primary);
    outline-offset: 2px;
}

.btn-responder {
    background: var(--sol-success);
    color: white;
}

.btn-responder:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-archivar {
    background: var(--sol-warning);
    color: #212529;
}

.btn-archivar:hover {
    background: #e0a800;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-eliminar {
    background: var(--sol-danger);
    color: white;
}

.btn-eliminar:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ===== MODAL DE RESPUESTA ===== */
.modal-respuesta {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-respuesta-content {
    background: white;
    border-radius: var(--sol-radius);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-respuesta-header {
    background: var(--sol-success);
    color: white;
    padding: 20px;
    border-radius: var(--sol-radius) var(--sol-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-respuesta-header h6 {
    margin: 0;
    font-weight: 600;
}

.modal-respuesta-body {
    padding: 20px;
}

.modal-respuesta-body .form-group {
    margin-bottom: 20px;
}

.modal-respuesta-body .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--sol-dark);
}

.modal-respuesta-body .form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--sol-transition);
    font-family: inherit;
    resize: vertical;
}

.modal-respuesta-body .form-control:focus {
    outline: none;
    border-color: var(--sol-primary);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.modal-respuesta-footer {
    padding: 20px;
    background: var(--sol-light);
    border-radius: 0 0 var(--sol-radius) var(--sol-radius);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid rgba(0,0,0,0.1);
}

/* ===== ESTADOS VACÍOS ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 15px;
    display: block;
}

.empty-state h6 {
    margin-bottom: 10px;
    color: var(--sol-dark);
}

.empty-state p {
    margin: 0;
    line-height: 1.5;
}

/* ===== LOADING STATES ===== */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--sol-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear 10;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-card {
    background: linear-gradient(-90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 400% 400%;
    animation: loading-shimmer 1.5s ease-in-out 5;
    border-radius: var(--sol-radius);
    height: 120px;
    margin-bottom: 8px;
}

@keyframes loading-shimmer {
    0% { background-position: 400% 0%; }
    100% { background-position: -400% 0%; }
}

/* ===== NOTIFICACIONES TOAST ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
}

.toast-solicitudes {
    background: white;
    border-radius: 6px;
    box-shadow: var(--sol-shadow-lg);
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--sol-success);
    min-width: 300px;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-solicitudes.error {
    border-left-color: var(--sol-danger);
}

.toast-solicitudes i {
    flex-shrink: 0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== ANIMACIONES ===== */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.3s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animation-delay-1 { animation-delay: 0.1s; }
.animation-delay-2 { animation-delay: 0.2s; }
.animation-delay-3 { animation-delay: 0.3s; }
.animation-delay-4 { animation-delay: 0.4s; }
.animation-delay-5 { animation-delay: 0.5s; }

/* ===== PROGRESS BAR ANIMADA ===== */
.progress-bar-animated {
    background: linear-gradient(90deg, var(--sol-success), #20c997);
    border-radius: 10px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-animated::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 50px 50px;
    animation: progressMove 2s linear infinite;
}

@keyframes progressMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.progress-bar-animated::after {
    animation: progressMove 2s linear 3;
}

/* ===== RESPONSIVE: Mobile First ===== */

/* Mobile (< 576px) */
@media (max-width: 575.98px) {
    .stats-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }
    
    .stat-item {
        padding: 8px 4px;
    }
    
    .stat-item .stat-icon {
        font-size: 1rem;
    }
    
    .stat-item .stat-value {
        font-size: 1.2rem;
    }
    
    .stat-item .stat-label {
        font-size: 0.55rem;
    }
    
    .metrics-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .solicitudes-list {
        padding: 15px;
        max-height: 55vh;
    }
    
    .solicitud-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .animal-info {
        width: 100%;
    }
    
    .status-badge {
        align-self: flex-start;
    }
    
    .solicitante-info {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .solicitud-actions {
        flex-direction: column;
    }
    
    .btn-action {
        justify-content: center;
    }
    
    .modal-respuesta {
        padding: 10px;
    }
    
    .modal-respuesta-footer {
        flex-direction: column;
    }
    
    .toast-solicitudes {
        min-width: 280px;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
    }
    
    .animal-avatar {
        width: 35px;
        height: 35px;
    }
    
    .animal-details h6 {
        font-size: 0.9rem;
    }
    
    .info-item {
        font-size: 0.85rem;
        padding: 6px;
    }
    
    /* Solicitudes cards mobile - Layout horizontal como "mis animales" */
    .solicitud-card .col-auto,
    .card.solicitud-enviada .col-auto,
    .card.mb-3 .col-auto {
        flex: 0 0 auto;
        width: auto;
    }
    
    .solicitud-card .col-auto img,
    .card.solicitud-enviada .col-auto img,
    .card.mb-3 .col-auto img {
        width: 90px !important;
        height: 90px !important;
        object-fit: cover;
    }
    
    .solicitud-card .d-flex.justify-content-end,
    .card.solicitud-enviada .d-flex.justify-content-end,
    .card.mb-3 .d-flex.justify-content-end {
        justify-content: flex-start !important;
        flex-wrap: wrap;
    }
    
    .solicitud-card .d-flex.justify-content-end .btn,
    .card.solicitud-enviada .d-flex.justify-content-end .btn,
    .card.mb-3 .d-flex.justify-content-end .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Ajustar tipografía para móvil */
    .solicitud-card h5,
    .card.solicitud-enviada h5,
    .card.mb-3 h5 {
        font-size: 0.95rem;
    }
    
    .solicitud-card p.small,
    .card.solicitud-enviada p.small,
    .card.mb-3 p.small,
    .solicitud-card small,
    .card.solicitud-enviada small,
    .card.mb-3 small {
        font-size: 0.8rem;
    }
    
    /* Optimizar badges en móvil */
    .solicitud-card .badge,
    .card.solicitud-enviada .badge,
    .card.mb-3 .badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    /* Mensaje preview en móvil - más compacto */
    .solicitud-card .mensaje-preview,
    .card.solicitud-enviada .mensaje-preview,
    .card.mb-3 small.fst-italic {
        font-size: 0.75rem;
        max-width: 100%;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        line-height: 1.3;
    }
    
    /* Reducir padding de las cards en móvil */
    .solicitud-card,
    .card.solicitud-enviada,
    .card.mb-3 {
        padding: 12px !important;
    }
    
    /* Iconos un poco más pequeños en móvil */
    .solicitud-card .bi,
    .card.solicitud-enviada .bi,
    .card.mb-3 .bi {
        font-size: 0.85rem;
    }
}

/* Tablet (>= 576px) */
@media (min-width: 576px) {
    .solicitud-card .col-sm-3 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .solicitud-card .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .card.solicitud-enviada .col-sm-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .card.solicitud-enviada .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Desktop (>= 768px) */
@media (min-width: 768px) {
    .solicitud-card .col-md-2 {
        flex: 0 0 calc(25% - 6px);
        max-width: calc(25% - 6px);
    }
    
    .solicitud-card .col-md-7 {
        flex: 0 0 calc(45% - 6px);
        max-width: calc(45% - 6px);
    }
    
    .solicitud-card .col-md-3 {
        flex: 0 0 calc(30% - 6px);
        max-width: calc(30% - 6px);
    }
    
    .card.solicitud-enviada .col-md-2 {
        flex: 0 0 15%;
        max-width: 15%;
    }
    
    .card.solicitud-enviada .col-md-6 {
        flex: 0 0 calc(50% - 6px);
        max-width: calc(50% - 6px);
    }
    
    .card.solicitud-enviada .col-md-4 {
        flex: 0 0 calc(35% - 6px);
        max-width: calc(35% - 6px);
    }
    
    #modalSolicitudesContacto .modal-dialog {
        width: 90%;
        margin: 1.5rem auto;
    }
}

/* Large Desktop (>= 992px) */
@media (min-width: 992px) {
    #modalSolicitudesContacto .modal-dialog {
        width: 85%;
        max-width: 1100px;
    }
}

/* XL Desktop (>= 1200px) */
@media (min-width: 1200px) {
    #modalSolicitudesContacto .modal-dialog {
        width: 80%;
        max-width: 1200px;
    }
}

/* XXL Desktop (>= 1400px) */
@media (min-width: 1400px) {
    #modalSolicitudesContacto .modal-dialog {
        width: 75%;
        max-width: 1300px;
    }
}

/* Ultra Wide (>= 1600px) */
@media (min-width: 1600px) {
    #modalSolicitudesContacto .modal-dialog {
        max-width: 1400px;
    }
}

/* ===== MODAL HEADER Y TABS ===== */
#modalSolicitudesContacto .modal-header.bg-light {
    background-color: #f8f9fa;
    background-image: none;
    box-shadow: none;
    color: #212529;
}

#modalSolicitudesContacto .modal-title {
    text-align: center;
    margin: 0;
    width: 100%;
    font-weight: 600;
}

#modalSolicitudesContacto .modal-header {
    text-align: center;
    position: relative;
}

#modalSolicitudesContacto .nav-tabs {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    border-radius: 12px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    padding: 8px;
    margin: 8px auto;
    max-width: 500px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    gap: 6px;
}

#modalSolicitudesContacto .nav-tabs .nav-item {
    flex: 0 1 auto;
    text-align: center;
    min-width: 0;
}

#modalSolicitudesContacto .nav-tabs .nav-link {
    color: #495057 !important;
    background: white;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    opacity: 0.9;
    font-size: 0.85rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#modalSolicitudesContacto .nav-tabs .nav-link i {
    font-size: 0.9rem;
}

#modalSolicitudesContacto .nav-tabs .nav-link .badge {
    font-size: 0.6rem;
    padding: 2px 5px;
    margin-left: 2px;
    box-shadow: none;
    background-image: none;
}

#modalSolicitudesContacto .nav-tabs .nav-link:hover {
    color: #212529 !important;
    background: #fff;
    border-color: #007bff;
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,123,255,0.2);
}

#modalSolicitudesContacto .nav-tabs .nav-link.active {
    color: #fff !important;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
    font-weight: 700;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

/* Tabs más grandes en desktop */
@media (min-width: 576px) {
    #modalSolicitudesContacto .nav-tabs {
        max-width: 600px;
        padding: 10px;
    }
    
    #modalSolicitudesContacto .nav-tabs .nav-link {
        font-size: 0.95rem;
        padding: 12px 28px;
        gap: 8px;
    }
    
    #modalSolicitudesContacto .nav-tabs .nav-link .badge {
        font-size: 0.75rem;
        padding: 3px 7px;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --sol-shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
        --sol-shadow-lg: 0 8px 32px rgba(0,0,0,0.3);
    }
    
    .solicitud-card,
    .card.solicitud-enviada {
        border: 2px solid var(--sol-dark);
    }
    
    .filtro-btn {
        border: 2px solid var(--sol-dark);
    }
}

/* ===== PRINT ===== */
@media print {
    .filters-section,
    .solicitud-actions,
    .tips-card {
        display: none;
    }
    
    .solicitud-card,
    .card.solicitud-enviada {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}
/* ===== SOLICITUD ENVIADA - TEXTO DESCRIPTIVO (MOBILE FIRST) ===== */
/* Línea principal con tipo de solicitud destacado */
.card.solicitud-enviada .col .mb-2 {
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Tipo de solicitud (Adopción/Información/etc) con estilo destacado */
.card.solicitud-enviada .col .mb-2 .text-primary {
    font-weight: 700 !important;
    font-size: 1.05em;
    color: #0d6efd !important;
    text-decoration: underline;
    text-decoration-color: rgba(13, 110, 253, 0.3);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

/* Nombre del animal */
.card.solicitud-enviada .col .mb-2 .text-dark {
    font-weight: 700 !important;
    color: #212529 !important;
    font-size: 1.05em;
}

/* Especie entre paréntesis */
.card.solicitud-enviada .col .mb-2 .fw-normal {
    font-weight: 500 !important;
    color: #6c757d !important;
}

/* Texto secundario "Mi solicitud de / sobre / está" */
.card.solicitud-enviada .col .mb-2 .text-muted {
    color: #495057 !important;
    font-weight: 400;
}

/* Espaciado óptimo para badges de estado */
.card.solicitud-enviada .badge {
    vertical-align: middle;
    margin-left: 2px;
}

/* ===== RESPONSIVE - TABLET (576px+) ===== */
@media (min-width: 576px) {
    .card.solicitud-enviada .col .mb-2 {
        font-size: 0.95rem;
    }
    
    .card.solicitud-enviada .col .mb-2 .text-primary,
    .card.solicitud-enviada .col .mb-2 .text-dark {
        font-size: 1.1em;
    }
}

/* ===== RESPONSIVE - DESKTOP (768px+) ===== */
@media (min-width: 768px) {
    .card.solicitud-enviada .col .mb-2 {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .card.solicitud-enviada .col .mb-2 .text-primary {
        text-decoration-thickness: 2.5px;
        text-underline-offset: 3px;
    }
}

/* ===== ESTADOS VISUALES ===== */
/* Badge aceptada - mejorar contraste */
.badge.bg-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Badge rechazada - mejorar contraste */
.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Badge pendiente - mejorar contraste */
.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
    color: #000 !important;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

/* ===== BOTÓN SOLICITUD ENVIADA - MOBILE FIRST ===== */
.solicitud-enviada-subtitle {
    opacity: 0.75;
    font-size: 0.7rem;
    margin-top: -2px;
    display: block;
    line-height: 1.2;
}

/* Desktop: mejorar legibilidad */
@media (min-width: 768px) {
    .solicitud-enviada-subtitle {
        font-size: 0.75rem;
    }
}

/* ===== DISEÑO COMPACT PARA SOLICITUDES - MOBILE FIRST ===== */
/* Basado en Modal 5 "Compact" de propuesta v8 */

.solicitud-card-compact {
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.solicitud-card-compact:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.solicitud-card-compact .card-header {
    position: relative;
}

.solicitud-card-compact .card-body {
    background: white;
}

/* Animaciones de entrada */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.fade-in-up.animate__animated {
    opacity: 1;
    transform: translateY(0);
}

/* Grid responsive */
@media (max-width: 767px) {
    .solicitud-card-compact {
        max-width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .solicitud-card-compact {
        height: 100%;
    }
}

@media (min-width: 992px) {
    .solicitud-card-compact {
        height: 100%;
    }
}

/* Botones compactos */
.solicitud-card-compact .btn-sm {
    transition: all 0.2s ease;
}

.solicitud-card-compact .btn-sm:hover {
    transform: translateY(-1px);
}

/* Mensajes compactos */
.solicitud-card-compact .message-bubble {
    line-height: 1.4;
}

/* Badges en header */
.solicitud-card-compact .badge {
    font-weight: 700;
    letter-spacing: 0.025em;
}

/* Info cards */
.solicitud-card-compact .info-card {
    transition: background 0.2s ease;
}

.solicitud-card-compact .info-card:hover {
    background: #ecfeff !important;
}

/* ======================================================
   DISEÑO LIST-CARD (patrón mis-animales) — MOBILE FIRST
   ====================================================== */

/* Contenedor lista */
.solicitudes-list {
    padding: 0;
}

/* Tarjeta base */
.solicitud-card {
    transition: background-color .18s ease, border-color .18s ease;
    background: #fff;
}

/* Bordes de color por estado */
.solicitud-card.estado-pendiente  { border: 1.5px solid #ffc107 !important; }
.solicitud-card.estado-aceptada   { border: 1.5px solid #198754 !important; }
.solicitud-card.estado-rechazada  { border: 1.5px solid #dc3545 !important; }
.solicitud-card.estado-expirada   { border: 1.5px solid #adb5bd !important; }

/* Hover tint por estado */
.solicitud-card.estado-pendiente:hover  { background-color: rgba(255, 193, 7,   .06) !important; }
.solicitud-card.estado-aceptada:hover   { background-color: rgba(25,  135, 84,  .06) !important; }
.solicitud-card.estado-rechazada:hover  { background-color: rgba(220, 53,  69,  .06) !important; }
.solicitud-card.estado-expirada:hover   { background-color: rgba(108, 117, 125, .06) !important; }

/* Expirada — apagada */
.solicitud-expirada {
    opacity: .72;
}

/* Thumbnail */
.solicitud-thumb {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    background: rgba(102, 126, 234, .07);
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    flex-shrink: 0;
    overflow: hidden;
}
.solicitud-thumb img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: .5rem;
}
.solicitud-thumb-expirada {
    filter: grayscale(60%);
}

/* Mensaje preview pill */
.msg-preview-pill-wrap {
    background: #f1f3f5;
}
.msg-pill-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #667eea;
    margin-bottom: 2px;
}
.msg-preview-pill {
    font-size: .72rem;
    line-height: 1.4;
    color: #6c757d;
    font-style: italic;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── Section pill headers (agrupación por estado) ── */
.sec-pill {
    display: flex;
    align-items: center;
    gap: .45rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-weight: 700;
    font-size: .80rem;
    letter-spacing: .4px;
    padding: .45rem 1rem;
    border-radius: 50px;
    margin-bottom: .85rem;
    margin-top: .25rem;
    user-select: none;
}

/* Animación de entrada (reutilizada del diseño anterior) */
.solicitud-card.fade-in-up {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease;
}
