/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #87CEEB, #1E3A8A);
    color: #333;
    min-height: 100vh;
}

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

/* Tela de carregamento */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #87CEEB, #1E3A8A);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.cross-animation {
    margin-bottom: 30px;
}

.cross {
    width: 80px;
    height: 80px;
    position: relative;
    animation: crossRotate 3s infinite linear;
}

.cross:before, .cross:after {
    content: '';
    position: absolute;
    background-color: white;
}

.cross:before {
    width: 100%;
    height: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.cross:after {
    width: 20px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes crossRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar {
    width: 300px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress {
    height: 100%;
    width: 0%;
    background-color: white;
    animation: progressLoad 3s forwards;
}

@keyframes progressLoad {
    0% { width: 0%; }
    100% { width: 100%; }
}

#loading-screen p {
    color: white;
    font-size: 18px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Formulários */
.login-section, .visitor-access {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.coords {
    display: flex;
    gap: 10px;
}

.coords input {
    flex: 1;
}

.btn {
    background: linear-gradient(135deg, #1E3A8A, #3B82F6);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.small-btn {
    padding: 8px 15px;
    font-size: 14px;
}

.visitor-btn {
    background: linear-gradient(135deg, #10B981, #059669);
}

.register-link {
    margin-top: 15px;
    text-align: center;
}

/* Dashboard */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card h3 {
    color: #1E3A8A;
    margin-bottom: 10px;
}

.card p {
    font-size: 2rem;
    font-weight: bold;
    color: #3B82F6;
}

.actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Mapa */
#map, #map-visitor {
    height: 500px;
    width: 100%;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Lista de sepulturas */
.sepulturas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.sepultura-item {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sepultura-thumb {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-top: 10px;
}

/* Header interno */
.internal-header {
    background-color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.internal-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.internal-header h1 {
    color: #1E3A8A;
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Busca */
.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#search-input {
    flex: 1;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .internal-header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .coords {
        flex-direction: column;
    }
}
/* Estilos administrativos */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #1E3A8A;
    margin-bottom: 10px;
    font-size: 1rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: #3B82F6;
}

.admin-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.admin-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.operador-form {
    max-width: 500px;
}

.users-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge.admin {
    background-color: #dc3545;
    color: white;
}

.badge.operador {
    background-color: #28a745;
    color: white;
}

.badge.visitante {
    background-color: #6c757d;
    color: white;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status.ativo {
    background-color: #d4edda;
    color: #155724;
}

.status.inativo {
    background-color: #f8d7da;
    color: #721c24;
}

.operadores-report {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.operador-item {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.progress-bar-small {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-small .progress {
    height: 100%;
    background: linear-gradient(135deg, #1E3A8A, #3B82F6);
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.info {
    background-color: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.sepultura-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.user-type {
    font-size: 0.9rem;
    opacity: 0.8;
}

.user-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Responsividade para tabelas */
@media (max-width: 768px) {
    .users-table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 8px 4px;
    }
    
    .user-menu {
        flex-direction: column;
    }
}
/* Estilos do Footer */
.main-footer {
    background: linear-gradient(135deg, #1E3A8A, #1e3a8a);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    color: #87CEEB;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.contact-info p {
    margin-bottom: 8px;
}

.system-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-developer .heart {
    color: #ff6b6b;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal h3 {
    color: #1E3A8A;
    margin-bottom: 15px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner .cross {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    position: relative;
    animation: crossRotate 2s infinite linear;
}

.loading-spinner .cross:before,
.loading-spinner .cross:after {
    content: '';
    position: absolute;
    background-color: white;
}

.loading-spinner .cross:before {
    width: 100%;
    height: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.loading-spinner .cross:after {
    width: 15px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

/* Responsividade do Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* Melhorias para acessibilidade */
@media (prefers-reduced-motion: reduce) {
    .footer-developer .heart {
        animation: none;
    }
    
    .loading-spinner .cross {
        animation: none;
    }
}

/* Modo escuro do sistema */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: #2d3748;
        color: white;
    }
    
    .modal h3 {
        color: #87CEEB;
    }
}
/* Estilos da Câmera */
.camera-section {
    border: 2px dashed #ddd;
    padding: 20px;
    border-radius: 10px;
    background-color: #f9f9f9;
    text-align: center;
}

.camera-preview {
    margin: 15px 0;
}

.camera-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.camera-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 15px 0;
}

.camera-btn {
    padding: 12px 20px;
    font-size: 16px;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
}

#camera-stream {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    margin: 10px 0;
}

.camera-instructions {
    display: block;
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.camera-status {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-weight: bold;
}

.camera-status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.camera-status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.camera-status-info {
    background-color: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.location-info {
    margin: 15px 0;
}

/* Indicador de câmera ativa */
.camera-active {
    position: relative;
}

.camera-active::after {
    content: "●";
    color: #ff4444;
    font-size: 20px;
    position: absolute;
    top: 10px;
    right: 10px;
    animation: pulse 1.5s infinite;
}

/* Responsividade para câmera */
@media (max-width: 768px) {
    .camera-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .camera-btn {
        width: 100%;
        max-width: 250px;
    }
    
    #camera-stream {
        max-width: 100%;
    }
}

/* Animações */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Estilo para quando a câmera está ativa */
.video-active {
    border: 3px solid #3B82F6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.camera-status {
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid transparent;
}

.camera-status-success {
    background-color: #d4f8e8;
    color: #0d6832;
    border-color: #a3e6c5;
}

.camera-status-error {
    background-color: #fde8e8;
    color: #c53030;
    border-color: #feb2b2;
}

.camera-status-info {
    background-color: #e1effe;
    color: #1e40af;
    border-color: #93c5fd;
}

.camera-status-warning {
    background-color: #fffbeb;
    color: #d97706;
    border-color: #fcd34d;
}