/* Estilos Base */
:root {
    --primary: #4e73df;
    --secondary: #1cc88a;
    --danger: #e74a3b;
    --warning: #f6c23e;
    --dark: #5a5c69;
    --light: #f8f9fc;
    --whatsapp: #25d366;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    line-height: 1.6;
}

/* Container Principal */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

/* Fundos com transparência */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.25;
    z-index: -1;
}

.fundo1::before { background-image: url('/imagens/fundo1.png'); }
.fundo2::before { background-image: url('/imagens/fundo2.png'); }
.fundo3::before { background-image: url('/imagens/fundo3.png'); }
.fundo4::before { background-image: url('/imagens/fundo4.png'); }

/* Garantia de que o conteúdo fique na frente */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards e Containers */
.form-container, .pet-profile, .qrcode-container {
    background-color: rgba(0, 0, 0, 0.85);
    padding: 2.5rem;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

/* Cabeçalhos */
h1, h2, h3 {
    color: var(--light);
    margin-bottom: 1.5rem;
    text-align: center;
}
h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--light);
}
input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.35rem;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Botões */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.35rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: #2e59d9;
}
.btn-secondary {
    background-color: var(--dark);
    color: white;
}
.btn-secondary:hover {
    background-color: #42444e;
}
.btn-whatsapp {
    background-color: var(--whatsapp);
    color: white;
}
.btn-whatsapp:hover {
    background-color: #128C7E;
}

/* Alertas */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.35rem;
}
.error {
    background-color: rgba(231, 74, 59, 0.2);
    border-left: 4px solid var(--danger);
    color: #ff6b6b;
}

/* Perfil do Pet */
.pet-photo {
    text-align: center;
    margin-bottom: 1.5rem;
}
.pet-info {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 0.35rem;
    margin-bottom: 1.5rem;
}
.pet-info p {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}
.pet-info i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}
.status-normal { color: var(--secondary); }
.status-desaparecido { color: var(--danger); }
.status-localizado { color: var(--warning); }

/* QR Code */
.qrcode-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.35rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.qrcode-url {
    margin-top: 1rem;
    word-break: break-all;
    color: var(--dark);
}
.instructions {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 0.35rem;
    margin-bottom: 1.5rem;
}
.instructions ol {
    padding-left: 1.5rem;
}
.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Rodapé */
footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: auto;
    padding: 1rem;
}

/* Ícones */
.fas, .fab {
    margin-right: 0.5rem;
}

/* Área de Gerenciamento de Pets */
.management-container {
    width: 100%;
    max-width: 1200px;
}
.actions-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.no-pets {
    text-align: center;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0.5rem;
}
.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.pet-card {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: transform 0.3s;
}
.pet-card:hover {
    transform: translateY(-5px);
}
.pet-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}
.pet-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}
.no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}
.no-photo-large {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 3rem;
    margin: 0 auto;
}
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: auto;
}
.pet-details {
    margin-bottom: 1.5rem;
}
.pet-details p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pet-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Página de Visualização Detalhada */
.pet-detail-container {
    width: 100%;
    max-width: 1200px;
}
.back-button {
    margin-bottom: 1.5rem;
}
.pet-profile {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
@media (max-width: 768px) {
    .pet-profile {
        grid-template-columns: 1fr;
    }
}
.pet-photo img {
    width: 100%;
    max-width: 300px;
    border-radius: 0.5rem;
    border: 5px solid var(--primary);
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.info-card {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    border-radius: 0.5rem;
}
.info-card h3 {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
    font-size: 1.2rem;
}
.info-card ul {
    list-style: none;
}
.info-card li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.qr-code-section {
    margin-top: 2rem;
    text-align: center;
}
.qr-code-container {
    display: inline-block;
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

/* Histórico e Abas */
.history-section {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
}
.history-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}
.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
    position: relative;
}
.tab-button.active {
    color: var(--primary);
}
.tab-button.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary);
}
.tab-content {
    display: none;
}
.current-photo {
    text-align: center;
    margin-bottom: 1rem;
}
.current-photo img {
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Responsividade */
@media (max-width: 576px) {
    .form-group label {
        font-size: 0.9rem;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    .btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    .info-grid {
        display: block;
    }
    .checkbox-inline {
        display: flex;
        align-items: center;
        font-size: 0.9rem;
    }
    .checkbox-inline input[type="checkbox"] {
        margin-right: 8px;
        flex-shrink: 0;
    }
    .checkbox-inline span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Dashboard do Tutor */
.dashboard {
    width: 100%;
    max-width: 1200px;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.welcome h1 {
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
    text-align: left;
}
.welcome p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}
.quick-actions {
    display: flex;
    gap: 1rem;
}

/* Estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
}
.stat-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}
.stat-card.total {
    background-color: rgba(78, 115, 223, 0.2);
    border-left: 4px solid var(--primary);
}
.stat-card.normal {
    background-color: rgba(28, 200, 138, 0.2);
    border-left: 4px solid var(--secondary);
}
.stat-card.desaparecido {
    background-color: rgba(231, 74, 59, 0.2);
    border-left: 4px solid var(--danger);
}
.stat-card.localizado {
    background-color: rgba(246, 194, 62, 0.2);
    border-left: 4px solid var(--warning);
}

/* Conteúdo Principal */
.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.section-card {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 0.5rem;
    padding: 1.5rem;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.section-header h2 {
    margin: 0;
    font-size: 1.3rem;
    border: none;
    padding: 0;
    text-align: left;
}

/* Lista de Pets Mini */
.pets-mini-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.pet-mini-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}
.pet-mini-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.pet-mini-avatar.no-photo {
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
}
.pet-mini-info {
    flex-grow: 1;
}
.pet-mini-info h4 {
    margin: 0;
    font-size: 1rem;
}
.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    display: inline-block;
}

/* Listas de Alertas e Localizações */
.alertas-list, .localizacoes-list {
    list-style: none;
}
.alertas-list li, .localizacoes-list li {
    padding: .75rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.alerta-info, .localizacao-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}
.alerta-pet, .localizacao-pet {
    font-weight: bold;
}
.alerta-data, .localizacao-data {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}
.empty-state {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Estilos do Footer */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 3px solid #4e73df;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-section h3 {
    color: #4e73df;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #4e73df;
    padding-bottom: 0.5rem;
}
.footer-section ul {
    list-style: none;
    padding: 0;
}
.footer-section li {
    margin-bottom: 0.8rem;
}
.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-section a:hover,
.footer-section a.active {
    color: #4e73df;
}
.footer-section i {
    width: 20px;
    text-align: center;
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #34495e;
    font-size: 0.9rem;
}
.footer-bottom .version {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
}

/* Links brancos */
a {
    color: white !important;
    text-decoration: none;
}
a:link, a:visited, a:hover, a:active {
    color: white !important;
    text-decoration: none;
}

/* Limita a largura máxima dos campos */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea {
    max-width: 100%;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Para textareas específicos */
textarea {
    resize: vertical; /* Permite redimensionamento vertical apenas */
    height: auto;
}