* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f8faf9 0%, #e8f5e8 100%);
    min-height: 100vh;
    color: #2d3748;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: #2d5016;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Página Inicial - Seleção de Pets */
.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.pet-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(45, 80, 22, 0.06);
}

.pet-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(45, 80, 22, 0.15);
    border-color: #6b8e23;
}

.pet-image {
    height: 200px;
    background: linear-gradient(135deg, #9caf88 0%, #6b8e23 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.pet-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
}

.pet-image span {
    z-index: 1;
    position: relative;
}

.pet-info {
    padding: 24px;
    text-align: center;
}

.pet-info h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #2d5016;
    font-weight: 500;
}

.pet-info p {
    color: #68815b;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Navegação */
.nav-bar {
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(45, 80, 22, 0.08);
    border: 1px solid rgba(45, 80, 22, 0.06);
}

.back-btn {
    background: #68815b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.back-btn:hover {
    background: #5a6f4d;
}

.pet-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d5016;
}

.add-btn {
    background: #6b8e23;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    width: 56px;
    height: 56px;
    position: fixed;
    bottom: 24px;
    right: 24px;
    box-shadow: 0 4px 20px rgba(107, 142, 35, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: 300;
}

.add-btn:hover {
    background: #5d7a1f;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(107, 142, 35, 0.4);
}

/* Filtros */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: white;
    border: 1px solid #d4d4d8;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #68815b;
}

.filter-btn.active {
    background: #6b8e23;
    color: white;
    border-color: #6b8e23;
}

.filter-btn:hover {
    border-color: #6b8e23;
    background: #f8faf9;
}

.filter-btn.active:hover {
    background: #5d7a1f;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: #d4d4d8;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(45, 80, 22, 0.08);
    margin-left: 60%;
    width: 40%;
    animation: slideInRight 0.4s ease;
    border: 1px solid rgba(45, 80, 22, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.15);
}

.timeline-item:nth-child(even) {
    margin-left: 0;
    animation: slideInLeft 0.4s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #6b8e23;
    border-radius: 50%;
    top: 30px;
    left: -66px;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(107, 142, 35, 0.3);
}

.timeline-item:nth-child(even)::before {
    right: -66px;
    left: auto;
}

.timeline-item img {
    width: 100%;
    max-width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.timeline-date {
    color: #68815b;
    font-size: 0.85rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2d5016;
}

.timeline-category {
    display: inline-block;
    background: #f0f4ed;
    color: #5d7a1f;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.timeline-description {
    color: #68815b;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Formulários */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.08);
    border: 1px solid rgba(45, 80, 22, 0.06);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d5016;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d4d4d8;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #6b8e23;
    box-shadow: 0 0 0 3px rgba(107, 142, 35, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Upload de Arquivos */
.file-upload-area {
    border: 2px dashed #d4d4d8;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: #6b8e23;
    background: #f8faf9;
}

.file-upload-area.dragover {
    border-color: #6b8e23;
    background: #f0f4ed;
}

#file-list {
    margin-top: 15px;
}

.file-item {
    background: #f8f9fa;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.file-item button:hover {
    background: #c82333;
}

/* Botões */
.submit-btn {
    background: #6b8e23;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
}

.submit-btn:hover {
    background: #5d7a1f;
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Estados de carregamento */
.loading {
    text-align: center;
    padding: 40px;
    color: #68815b;
    font-weight: 500;
}

.no-entries {
    text-align: center;
    padding: 60px 20px;
    color: #68815b;
}

.no-entries h3 {
    margin-bottom: 12px;
    color: #2d5016;
    font-weight: 500;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s ease;
    z-index: 1;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d5016;
    margin-bottom: 8px;
    padding-right: 50px;
}

.modal-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.modal-date {
    color: #68815b;
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-category {
    background: #f0f4ed;
    color: #5d7a1f;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.modal-body {
    padding: 0 24px 24px 24px;
}

.modal-description {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 24px;
    white-space: pre-wrap;
}

.modal-images {
    margin-bottom: 24px;
}

.modal-image {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.modal-btn-edit {
    background: #6b8e23;
    color: white;
}

.modal-btn-edit:hover {
    background: #5d7a1f;
}

.modal-btn-delete {
    background: #dc3545;
    color: white;
}

.modal-btn-delete:hover {
    background: #c82333;
}

.modal-btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.modal-btn-cancel:hover {
    background: #e5e7eb;
}

/* Modal em modo edição */
.modal-edit-form {
    display: none;
    margin-bottom: 20px;
}

.modal-edit-form.active {
    display: block;
}

.modal-view-content.editing {
    display: none;
}

.modal-form-group {
    margin-bottom: 20px;
}

.modal-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d5016;
    font-size: 0.9rem;
}

.modal-form-group input,
.modal-form-group textarea,
.modal-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d4d4d8;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.modal-form-group input:focus,
.modal-form-group textarea:focus,
.modal-form-group select:focus {
    outline: none;
    border-color: #6b8e23;
    box-shadow: 0 0 0 3px rgba(107, 142, 35, 0.1);
}

.modal-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Responsivo */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: calc(100% - 80px);
        margin-left: 80px;
    }

    .timeline-item:nth-child(even) {
        margin-left: 80px;
    }

    .timeline-item::before,
    .timeline-item:nth-child(even)::before {
        left: -40px;
    }

    .pets-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        justify-content: center;
    }

    .nav-bar {
        flex-direction: column;
        gap: 15px;
    }

    .form-container {
        padding: 24px;
    }

    .add-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* Responsivo para modal */
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px 20px 16px 20px;
    }
    
    .modal-body {
        padding: 0 20px 20px 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }

    .modal-title {
        font-size: 1.3rem;
    }
}

/* Animações */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}