/* Modern Weather Dashboard Styles */

:root {
    /* Color Palette */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    /* Neutrals */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.875rem; }
h5 { font-size: 1.125rem; margin-bottom: 0.75rem; }

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    box-shadow: var(--shadow-md);
    border: none;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 1.75rem;
}

.navbar-brand small {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
}

/* Disabled links styling */
a.disabled,
.nav-link.disabled,
.dropdown-item.disabled,
.btn.disabled,
.analytics-tool-card.disabled {
    opacity: 0.5;
    text-decoration: line-through !important;
    color: var(--gray-400) !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.navbar-nav .nav-link.disabled {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.4) !important;
}

.dropdown-item.disabled {
    background-color: transparent !important;
    color: var(--gray-400) !important;
}

.analytics-tool-card.disabled {
    background-color: var(--gray-100) !important;
    border-color: var(--gray-300) !important;
}

.analytics-tool-card.disabled i {
    color: var(--gray-400) !important;
}

.analytics-tool-card.disabled small {
    color: var(--gray-400) !important;
}

/* Sidebar */
.sidebar {
    background-color: white;
    border-right: 1px solid var(--gray-200);
    min-height: calc(100vh - 76px);
    padding: 2rem 1.5rem;
}

.sidebar h6 {
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.sidebar .nav-pills .nav-link {
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .nav-pills .nav-link i {
    font-size: 1.125rem;
    width: 1.25rem;
}

.sidebar .nav-pills .nav-link:hover {
    background-color: var(--gray-100);
    color: var(--primary);
}

.sidebar .nav-pills .nav-link.active {
    background-color: var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    padding: 2rem;
    background-color: var(--gray-50);
    min-height: calc(100vh - 76px);
}

/* Cards */
.card {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards */
.card-stat {
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
}

.card-stat h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.card-stat p {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* Weather Cards */
.weather-card {
    border-radius: var(--radius-lg);
    background: white;
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.weather-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.weather-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.temperature {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.weather-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.weather-detail:last-child {
    border-bottom: none;
}

/* Tables */
.table {
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background-color: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    color: var(--gray-700);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

/* Forms */
.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background-color: var(--gray-300);
    color: var(--gray-800);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    background-color: var(--gray-50);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: var(--gray-100);
}

.upload-area.dragover {
    border-color: var(--primary);
    background-color: rgba(37, 99, 235, 0.05);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    background-color: white;
    padding: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.alert-info {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 100px;
    right: 2rem;
    z-index: 1050;
    max-width: 400px;
}

.flash-messages .alert {
    box-shadow: var(--shadow-lg);
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer */
footer {
    background-color: white !important;
    border-top: 1px solid var(--gray-200);
    padding: 2rem 0;
    margin-top: auto;
}

/* Responsive Grid */
.dashboard-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--gray-200);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-muted {
    color: var(--gray-500) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.bg-light {
    background-color: var(--gray-50) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        min-height: auto;
        padding: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Analytics-specific styles */
.analytics-tool-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.analytics-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

.analytics-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.analytics-tool-card:hover::before {
    left: 100%;
}

.breadcrumb-nav {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.activity-feed {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.activity-feed::-webkit-scrollbar {
    width: 6px;
}

.activity-feed::-webkit-scrollbar-track {
    background: transparent;
}

.activity-feed::-webkit-scrollbar-thumb {
    background-color: var(--gray-300);
    border-radius: 3px;
}

.activity-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background-color: var(--gray-50);
    border-left-color: var(--primary);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.activity-icon.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.activity-icon.info {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

.activity-icon.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.notifications-container {
    z-index: 1060;
    max-width: 400px;
}

.spinner-grow-sm {
    width: 1rem;
    height: 1rem;
}

/* View mode styles */
.view-list .analytics-tools-container {
    flex-direction: column;
}

.view-list .analytics-tool-card {
    display: flex;
    text-align: left;
    margin-bottom: 0.75rem;
    padding: 1rem;
}

.view-list .analytics-tool-card .text-center {
    text-align: left !important;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-list .analytics-tool-card .display-5 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.view-compact .analytics-tool-card {
    padding: 0.75rem;
}

.view-compact .analytics-tool-card .display-5 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.view-compact .analytics-tool-card h6 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.view-compact .analytics-tool-card small {
    font-size: 0.75rem;
}

/* Responsive analytics improvements */
@media (max-width: 992px) {
    .analytics-tool-card {
        margin-bottom: 1rem;
    }
    
    .activity-feed {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .analytics-tool-card .display-5 {
        font-size: 1.5rem;
    }
    
    .view-list .analytics-tool-card {
        flex-direction: column;
        text-align: center;
    }
    
    .view-list .analytics-tool-card .text-center {
        flex-direction: column;
        text-align: center !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}