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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#header {
    background: linear-gradient(135deg, #8B0000 0%, #2c3e50 100%);
    color: white;
    padding: 12px 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#header h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-header-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.login-header-btn:hover {
    background: #2ecc71;
    transform: scale(1.02);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.15);
    padding: 5px 15px;
    border-radius: 30px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.provider-badge {
    background: rgba(255,255,255,0.25);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 0;
    width: 90%;
    max-width: 420px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 15px 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, #8B0000, #2c3e50);
    color: white;
}

.modal-header i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.modal-header p {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Modal Buttons */
.modal-buttons {
    padding: 20px 20px 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-provider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-provider i {
    font-size: 1.2rem;
}

.btn-provider:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-facebook {
    background: #1877f2;
    color: white;
}

.btn-facebook:hover:not(:disabled) {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.btn-google {
    background: white;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.btn-google:hover:not(:disabled) {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-divider {
    text-align: center;
    margin: 15px 20px;
    position: relative;
    border-top: 1px solid #e0e0e0;
}

.modal-divider span {
    background: white;
    padding: 0 10px;
    position: relative;
    top: -11px;
    color: #7f8c8d;
    font-size: 0.8rem;
}

.btn-guest {
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    width: calc(100% - 40px);
    margin: 0 20px 20px 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-guest:hover:not(:disabled) {
    background: #d0d3d4;
    transform: translateY(-1px);
}

.btn-guest:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-footer {
    text-align: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    font-size: 0.75rem;
    color: #7f8c8d;
}

.modal-footer a {
    color: #1877f2;
    text-decoration: none;
}

.modal-footer a:hover {
    text-decoration: underline;
}

#main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

#map-container {
    flex: 3;
    height: 100%;
    position: relative;
}

#map {
    height: 100%;
    width: 100%;
    background: #a5c9e6;
}

#panel {
    flex: 1.2;
    background: #f8f9fa;
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid #dee2e6;
    box-shadow: -2px 0 10px rgba(0,0,0,0.05);
}

.card {
    background: white;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.card h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.btn {
    background: #8B0000;
    color: white;
    border: none;
    padding: 15px 18px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    font-weight: bold;
    margin: 8px 0;
    animation: pulse 2s infinite;
}

.btn:hover {
    background: #A52A2A;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(139,0,0,0.3);
    animation: none;
}

.btn:disabled {
    background: #95a5a6;
    animation: none;
    cursor: not-allowed;
    transform: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(139, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 0, 0, 0);
    }
}

.cuadrante-actual {
    background: #1a5f7a;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    text-align: center;
    font-size: 1.2rem;
    border: 2px solid #ffd700;
}

.alarma-activa {
    background: #8B0000;
    animation: alarmaBackground 1s infinite;
}

@keyframes alarmaBackground {
    0% { background-color: #8B0000; }
    50% { background-color: #FF4500; }
    100% { background-color: #8B0000; }
}

/* Estilo para el círculo de alarma en mapa */
.alarma-circulo {
    animation: alarmaPulso 2s infinite;
}

@keyframes alarmaPulso {
    0% {
        opacity: 0.8;
        r: 20;
    }
    50% {
        opacity: 0.3;
        r: 50;
    }
    100% {
        opacity: 0.8;
        r: 20;
    }
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 10px;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 0.9rem;
    font-weight: 500;
}