/* Estilos personalizados para o RebanhoApp */

:root {
    /* Paleta da marca (laranja da logo) */
    --primary-color: #d97706; /* laranja principal */
    --primary-dark: #9a5a04; /* variação mais escura */
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Estilos gerais */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar personalizada */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar .brand-logo {
    width: 28px;
    height: 28px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.navbar-nav .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* Cards personalizados */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.75rem 0.75rem 0 0 !important;
    font-weight: 600;
}

/* Dashboard cards */
.dashboard-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: scale(1.02);
}

.dashboard-card .card-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.dashboard-card .card-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.dashboard-card .card-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Status badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
}

.status-bezerro {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-jovem {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-adulto {
    background-color: #e8f5e8;
    color: #388e3c;
}

/* Tabelas responsivas */
.table-responsive {
    border-radius: 0.75rem;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

/* Formulários */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(217, 119, 6, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Botões personalizados */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Botões de ação na tabela */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    margin: 0 0.125rem;
}

/* Imagens de animais */
.animal-photo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 2px solid #dee2e6;
}

.animal-photo-large {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 3px solid #dee2e6;
}

.animal-photo-placeholder {
    width: 60px;
    height: 60px;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Paginação */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    border: 1px solid #dee2e6;
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Alertas personalizados */
.alert {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Modal personalizado */
.modal-content {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.75rem 0.75rem 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .dashboard-card {
        padding: 1rem;
    }
    
    .dashboard-card .card-icon {
        font-size: 2rem;
    }
    
    .dashboard-card .card-number {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-action {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .animal-photo {
        width: 50px;
        height: 50px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Tooltips personalizados */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 0.375rem;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Utilitários */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Estados de hover para cards */
.card-hover:hover {
    cursor: pointer;
    background-color: #f8f9fa;
}

/* Estilos para upload de arquivo */
.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-upload input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: block;
    padding: 0.75rem;
    border: 2px dashed #ced4da;
    border-radius: 0.5rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.file-upload:hover .file-upload-label {
    border-color: var(--primary-color);
    background-color: rgba(217, 119, 6, 0.05);
}

/* Forçar bg-primary da navbar e elementos para seguir a paleta */
.bg-primary {
    background-color: var(--primary-color) !important;
    background-image: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}
