/* Custom CSS for Dashboard Indikator Makro Kabupaten Karo */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* Header Styles */
.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-1px);
}

/* Indicator Cards */
.indicator-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.indicator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
}

/* Soft Color Backgrounds */
.bg-soft-blue {
    background-color: #e3f2fd !important;
    border-left: 4px solid #2196f3;
}

.bg-soft-green {
    background-color: #e8f5e8 !important;
    border-left: 4px solid #4caf50;
}

.bg-soft-cyan {
    background-color: #e0f7fa !important;
    border-left: 4px solid #00bcd4;
}

.bg-soft-orange {
    background-color: #fff3e0 !important;
    border-left: 4px solid #ff9800;
}

.bg-soft-red {
    background-color: #ffebee !important;
    border-left: 4px solid #f44336;
}

.bg-soft-purple {
    background-color: #f3e5f5 !important;
    border-left: 4px solid #9c27b0;
}

.bg-soft-pink {
    background-color: #fce4ec !important;
    border-left: 4px solid #e91e63;
}

.bg-soft-teal {
    background-color: #e0f2f1 !important;
    border-left: 4px solid #009688;
}

/* Soft Card Hover Effects */
.indicator-card.bg-soft-blue:hover {
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.15) !important;
    background-color: #bbdefb !important;
}

.indicator-card.bg-soft-green:hover {
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.15) !important;
    background-color: #c8e6c9 !important;
}

.indicator-card.bg-soft-cyan:hover {
    box-shadow: 0 8px 20px rgba(0, 188, 212, 0.15) !important;
    background-color: #b2ebf2 !important;
}

.indicator-card.bg-soft-orange:hover {
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.15) !important;
    background-color: #ffe0b2 !important;
}

.indicator-card.bg-soft-red:hover {
    box-shadow: 0 8px 20px rgba(244, 67, 54, 0.15) !important;
    background-color: #ffcdd2 !important;
}

.indicator-card.bg-soft-purple:hover {
    box-shadow: 0 8px 20px rgba(156, 39, 176, 0.15) !important;
    background-color: #e1bee7 !important;
}

/* Auto-calculation visual feedback */
.status-naik .form-select {
    border-color: #198754;
    background-color: #f8fff9;
}

.status-turun .form-select {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.status-tetap .form-select {
    border-color: #6c757d;
    background-color: #f8f9fa;
}

.change-positive input {
    border-color: #198754;
    background-color: #f8fff9;
    color: #198754;
    font-weight: bold;
}

.change-negative input {
    border-color: #dc3545;
    background-color: #fff8f8;
    color: #dc3545;
    font-weight: bold;
}

.change-neutral input {
    border-color: #6c757d;
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Disabled field styling */
.form-select:disabled,
.form-control[readonly] {
    background-color: #f8f9fa;
    opacity: 0.8;
}

.indicator-card.bg-soft-pink:hover {
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.15) !important;
    background-color: #f8bbd9 !important;
}

.indicator-card.bg-soft-teal:hover {
    box-shadow: 0 8px 20px rgba(0, 150, 136, 0.15) !important;
    background-color: #b2dfdb !important;
}

.indicator-icon {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.indicator-value h2 {
    font-weight: 700;
    letter-spacing: -1px;
}

.status-badge .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.change-indicator {
    padding: 0.4rem 0.6rem;
    background-color: rgba(255,255,255,0.4);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(5px);
}

/* Page Title */
.display-5 {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.indicator-card {
    animation: fadeInUp 0.6s ease forwards;
}

.indicator-card:nth-child(1) { animation-delay: 0.1s; }
.indicator-card:nth-child(2) { animation-delay: 0.2s; }
.indicator-card:nth-child(3) { animation-delay: 0.3s; }
.indicator-card:nth-child(4) { animation-delay: 0.4s; }
.indicator-card:nth-child(5) { animation-delay: 0.5s; }
.indicator-card:nth-child(6) { animation-delay: 0.6s; }

/* Login Form Styles */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #2c3e50, #34495e) !important;
}

footer a:hover {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .indicator-card {
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .indicator-icon {
        width: 40px;
        height: 40px;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    .indicator-value h4 {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .indicator-card {
        margin-bottom: 0.8rem;
    }
    
    .card-body {
        padding: 1rem 0.8rem;
    }
    
    .indicator-icon {
        width: 35px;
        height: 35px;
    }
    
    .card-title {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    .indicator-value h4 {
        font-size: 1.1rem;
    }
    
    .status-badge .badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.5rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}
