/* ============================================
   ADOPTAMIAU - SISTEMA DE ADOPCIÓN
   Diseño Corporativo Profesional
   ============================================ */

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores Corporativos */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Neutros */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Tipografía */
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Monaco', 'Courier New', monospace;
}

body {
    font-family: var(--font-sans);
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    font-size: 15px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* ============================================
   HEADER
   ============================================ */

header {
    background: #ffffff;
    padding: 32px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    margin-top: 8px;
}

/* ============================================
   NAVEGACIÓN
   ============================================ */

.navbar {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto 24px;
    max-width: 1280px;
    position: sticky;
    top: 20px;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--gray-900);
}

.nav-left a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.nav-left a:hover {
    color: var(--primary);
}

.nav-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--gray-700);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-links a.active {
    background: var(--primary);
    color: white;
}

.nav-links svg {
    width: 16px;
    height: 16px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-link {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid var(--gray-200);
    background: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-link:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.btn-link-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-link-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ============================================
   TABS
   ============================================ */

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.tab {
    background: transparent;
    color: var(--gray-700);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.tab:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.tab.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   GRID & CARDS
   ============================================ */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.card-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.card-image svg {
    width: 64px;
    height: 64px;
    color: var(--gray-400);
    position: relative;
    z-index: 1;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 1.25rem;
    color: var(--gray-900);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.card-info {
    color: var(--gray-600);
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.card-info strong {
    color: var(--gray-900);
    font-weight: 600;
}

.card-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

/* ============================================
   BADGES
   ============================================ */

.status-badge {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-available {
    background: #d1fae5;
    color: #065f46;
}

.status-adopted {
    background: #fef3c7;
    color: #92400e;
}

.status-reserved {
    background: #dbeafe;
    color: #1e40af;
}

.status-medical {
    background: #fce7f3;
    color: #9f1239;
}

/* ============================================
   BOTONES
   ============================================ */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   MODALES
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 8px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    margin: 0;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-400);
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.close-modal:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* ============================================
   FORMULARIOS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
    color: var(--gray-900);
    font-family: var(--font-sans);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--gray-500);
    font-size: 13px;
}

/* ============================================
   TIMELINE
   ============================================ */

.timeline {
    margin-top: 24px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.timeline h3 {
    margin-bottom: 16px;
    color: var(--gray-900);
}

.timeline-item {
    padding: 16px;
    border-left: 3px solid var(--primary);
    margin-left: 12px;
    margin-bottom: 16px;
    background: white;
    border-radius: 6px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 20px;
    width: 15px;
    height: 15px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 1px var(--gray-200);
}

.timeline-date {
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}

.timeline-add {
    margin-top: 24px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.timeline-add h3 {
    margin-bottom: 16px;
    color: var(--gray-900);
    font-size: 1rem;
}

/* ============================================
   BOTÓN FLOTANTE
   ============================================ */

.add-cat-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.add-cat-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
    background: var(--primary-dark);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    margin-top: 80px;
    padding: 60px 20px 0;
}

/* ============================================
   UTILIDADES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .navbar {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-links,
    .nav-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    header {
        padding: 24px;
    }
    
    .modal-content {
        padding: 24px;
    }
    
    .add-cat-btn {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .card-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 3px 10px;
    }
}