/* Estilos generales */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* Estilos del login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f5f6fa;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    display: block;
    max-width: 500px;
    margin: 0 auto 30px;
    height: auto;
}

.login-box h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #34495e;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.btn-login:hover {
    background-color: #2980b9;
}

/* Estilos del mapa */
#map {
    height: calc(100vh - 60px);
    width: 100%;
}

/* Barra de navegación */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    margin: 0;
    font-size: 20px;
}

.navbar .logout {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid white;
    border-radius: 3px;
}

/* Estilos de la leyenda del mapa */
.legend {
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.legend h4 {
    margin: 0 0 10px;
    color: #2c3e50;
}

.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
    border-radius: 50%;
}

.legend .legend-item {
    margin-bottom: 5px;
    clear: both;
}

/* Estilos para el popup del mapa */
.leaflet-popup-content {
    font-family: Arial, sans-serif;
    line-height: 1.4;
}

.leaflet-popup-content strong {
    color: #2c3e50;
}

.leaflet-popup-content em {
    color: #7f8c8d;
    font-style: italic;
}

/* Estilos del Dashboard */
.dashboard-body {
    display: flex;
    min-height: 100vh;
    background-color: #f5f6fa;
}

.dashboard-right {
    flex-grow: 1;
    background-color: #f8fafc;
    min-height: 100vh;
}

.dashboard-header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 30px;
    z-index: 100;
    height: 50px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 20px;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.username {
    color: #2c3e50;
    font-size: 14px;
}

.header-logout {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.header-logout:hover {
    background-color: #2980b9;
}

.sidebar {
    width: 250px;
    background-color: white;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eef2f7;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eef2f7;
}

.sidebar-logo {
    max-width: 300px;
    display: block;
    margin: 0 auto;
}

.sidebar-nav {
    padding: 20px 0;
    flex-grow: 1;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    margin: 4px 8px;
    border-radius: 8px;
}

.sidebar-item:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Iconos para cada ítem */
.sidebar-item[href*="dashboard"]:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z'/%3E%3C/svg%3E");
}

.sidebar-item[href*="balance"]:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H3V6h18v12zM9 8h2v8H9zm4 0h2v8h-2z'/%3E%3C/svg%3E");
}

.sidebar-item[href*="index"]:before,
.sidebar-item[href*="mapa"]:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z'/%3E%3C/svg%3E");
}

.sidebar-item:hover {
    color: #3b82f6;
    background-color: #f1f5f9;
}

.sidebar-item:hover:before {
    opacity: 1;
}

.sidebar-item.active {
    color: #3b82f6;
    background-color: #eff6ff;
    font-weight: 600;
}

.sidebar-item.active:before {
    opacity: 1;
}

/* Efecto de línea lateral para item activo */
.sidebar-item.active:after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background-color: #3b82f6;
    border-radius: 3px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.logout-link {
    display: block;
    padding: 10px;
    text-align: center;
    color: #e74c3c;
    text-decoration: none;
    border: 1px solid #e74c3c;
    border-radius: 5px;
    transition: all 0.3s;
}

.logout-link:hover {
    background-color: #e74c3c;
    color: white;
}

.main-content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    color: #2c3e50;
    margin: 0;
}

.content-body {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.upload-sections-row {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.upload-section {
    flex: 1;
    min-width: 280px;
    max-width: 600px;
}

.upload-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.upload-form .form-group {
    margin-bottom: 20px;
}

.btn-upload {
    background-color: #3498db;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn-upload:hover {
    background-color: #2980b9;
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #2ecc71;
    color: white;
}

.error-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: #e74c3c;
    color: white;
    text-align: center;
}

/* Estilos para el contenedor de procesamiento */
.processing-container {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.processing-box {
    text-align: center;
}

.processing-text {
    color: #333;
    font-size: 16px;
    margin: 15px 0;
}

/* Spinner de carga */
.processing-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Barra de progreso */
.processing-bar {
    width: 100%;
    height: 4px;
    background-color: #f3f3f3;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 20px;
}

.processing-bar-fill {
    width: 0%;
    height: 100%;
    background-color: #3498db;
    animation: fill 8s linear forwards;
}

@keyframes fill {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Mensajes de respuesta */
.response-message {
    margin-top: 30px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    animation: fadeIn 0.3s ease-in;
}

.response-message.success {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}

.response-message.error {
    background-color: #fdeded;
    border: 1px solid #fad2d2;
    color: #d93025;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ajuste del contenedor de carga de archivos */
.upload-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.upload-form {
    max-width: 500px;
}

/* Selector de empresas */
.company-selector {
    margin-right: 40px;
}

.modern-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 8px 35px 8px 12px;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: white;
    color: #333;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    min-width: 150px;
    transition: all 0.2s ease;
}

.modern-select:hover {
    border-color: #3498db;
}

.modern-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
} 