/*
 * SWMS Kathmandu - Main Stylesheet
 * Smart Waste Management System for Kathmandu Valley
 */

/* ===== CSS Variables ===== */
:root {
    --swms-primary: #198754;
    --swms-primary-dark: #146c43;
    --swms-secondary: #6c757d;
    --swms-success: #198754;
    --swms-warning: #ffc107;
    --swms-danger: #dc3545;
    --swms-info: #0dcaf0;
    --swms-light: #f8f9fa;
    --swms-dark: #212529;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --transition: all 0.3s ease;
}

/* ===== Base Styles ===== */
body {
    font-family: var(--font-primary);
    color: var(--swms-dark);
    background-color: #f5f7fb;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

.text-gradient {
    background: linear-gradient(135deg, var(--swms-primary), var(--swms-info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== Navigation ===== */
.navbar {
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

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

.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
    border-radius: 0.5rem;
}

/* Avatar Circle */
.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* Notification Badge */
.notification-badge {
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
}

.notification-dropdown {
    max-height: 400px;
    overflow-y: auto;
}

/* ===== Cards ===== */
.card {
    border-radius: 0.75rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== Buttons ===== */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--swms-primary);
    border-color: var(--swms-primary);
}

.btn-success:hover {
    background-color: var(--swms-primary-dark);
    border-color: var(--swms-primary-dark);
}

/* ===== Forms ===== */
.form-control, .form-select {
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    border-color: #dee2e6;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--swms-primary);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.input-group-text {
    border-radius: 0.5rem 0 0 0.5rem;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--swms-primary) 0%, #20c997 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-stats .stat-card {
    backdrop-filter: blur(10px);
}

/* ===== Feature Icons ===== */
.feature-icon {
    transition: var(--transition);
}

.card:hover .feature-icon {
    transform: scale(1.1);
}

/* ===== Tables ===== */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom-width: 2px;
}

.table-hover tbody tr:hover {
    background-color: rgba(25, 135, 84, 0.05);
}

/* ===== Badges ===== */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 0.375rem;
}

/* ===== Progress Bars ===== */
.progress {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* ===== Map Styles ===== */
.leaflet-container {
    border-radius: 0.75rem;
    z-index: 1;
}

.leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
}

/* ===== Auth Pages ===== */
.auth-page {
    background: linear-gradient(135deg, #f5f7fb 0%, #e8f5e9 100%);
}

/* ===== Dashboard ===== */
.dashboard-sidebar {
    background-color: white;
    min-height: 100vh;
    box-shadow: var(--shadow-sm);
}

.dashboard-sidebar .nav-link {
    color: var(--swms-secondary);
    border-radius: 0.5rem;
    margin: 0.25rem 0;
}

.dashboard-sidebar .nav-link:hover,
.dashboard-sidebar .nav-link.active {
    color: var(--swms-primary);
    background-color: rgba(25, 135, 84, 0.1);
}

/* ===== Status Colors ===== */
.status-pending { color: #ffc107; }
.status-confirmed { color: #0dcaf0; }
.status-assigned { color: #0d6efd; }
.status-in-progress { color: #17a2b8; }
.status-completed { color: #198754; }
.status-cancelled { color: #dc3545; }

/* ===== Fill Level Indicators ===== */
.fill-normal { background-color: #198754; }
.fill-warning { background-color: #ffc107; }
.fill-critical { background-color: #dc3545; }

/* ===== Animations ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

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

/* ===== Footer ===== */
footer {
    background-color: var(--swms-dark);
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--swms-primary) !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .stats-card h3 {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .navbar, footer, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6;
    }
}

/* ===== Utilities ===== */
.cursor-pointer {
    cursor: pointer;
}

.z-1 { z-index: 1; }
.z-10 { z-index: 10; }
.z-100 { z-index: 100; }

.min-h-300 {
    min-height: 300px;
}

.max-w-600 {
    max-width: 600px;
}

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--swms-primary) 0%, #20c997 100%);
}

.border-dashed {
    border-style: dashed !important;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
