/* Estilos personalizados para el Monitor de Cuencas */

:root {
    --primary-color: #0066cc;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar personalizado */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

.navbar-brand i {
    color: #17a2b8;
}

/* Cards */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.card-header {
    font-weight: 600;
    border-radius: 10px 10px 0 0 !important;
}

/* Badges de nivel */
.badge {
    padding: 0.35em 0.65em;
    font-size: 0.85em;
}

.bg-orange {
    background-color: #ff8c00 !important;
}

.text-orange {
    color: #ff8c00 !important;
}

/* Animación para alertas críticas */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.blink {
    animation: blink 1.5s linear infinite;
}

/* Tabla de cuencas */
.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.1);
    cursor: pointer;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Iconos de tendencia */
.bi-arrow-up-circle {
    animation: pulse 2s infinite;
}

.bi-arrow-down-circle {
    animation: pulse-reverse 2s infinite;
}

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

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

/* Dashboard cards */
.dashboard-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.dashboard-card .card-body {
    padding: 1.5rem;
}

.dashboard-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Alertas personalizadas */
.alert-cuenca {
    border-left: 4px solid;
}

.alert-cuenca.normal {
    border-left-color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.alert-cuenca.moderado {
    border-left-color: var(--warning-color);
    background-color: rgba(255, 193, 7, 0.1);
}

.alert-cuenca.elevado {
    border-left-color: #ff8c00;
    background-color: rgba(255, 140, 0, 0.1);
}

.alert-cuenca.critico {
    border-left-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

.alert-cuenca.peligro {
    border-left-color: #721c24;
    background-color: rgba(114, 28, 36, 0.1);
    animation: blink 1s infinite;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

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

/* Footer */
.footer {
    background-color: #f8f9fa !important;
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Spinner personalizado */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* Modales */
.modal-header {
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-content {
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Botones */
.btn {
    border-radius: 5px;
    transition: all 0.3s ease;
}

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

.btn-group-vertical .btn {
    border-radius: 0;
}

.btn-group-vertical .btn:first-child {
    border-radius: 5px 5px 0 0;
}

.btn-group-vertical .btn:last-child {
    border-radius: 0 0 5px 5px;
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Charts container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .dashboard-card i {
        font-size: 2rem;
    }
}

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

.loading-overlay .spinner-border {
    width: 5rem;
    height: 5rem;
    border-width: 0.5rem;
    color: white;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-indicator.online {
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    background-color: var(--danger-color);
}

.status-indicator.warning {
    background-color: var(--warning-color);
    animation: pulse 2s infinite;
}

/* Log viewer */
#systemLogs {
    background-color: #2b2b2b;
    color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
}

/* Custom tooltip */
.custom-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    z-index: 1000;
    pointer-events: none;
}

/* Print styles */
@media print {
    .navbar, .footer, .btn {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}


