/* GustMoore Blue Theme - Consistent Design Across All Pages */

:root {
    /* Primary Blue Palette */
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --primary-blue-light: #3b82f6;
    --accent-blue: #60a5fa;
    --light-blue: #dbeafe;
    --very-light-blue: #eff6ff;
    
    /* Secondary Colors */
    --secondary-navy: #1e3a8a;
    --secondary-teal: #0891b2;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* Border Colors */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-strong: #94a3b8;
    
    /* Status Colors */
    --success-green: #10b981;
    --warning-amber: #f59e0b;
    --danger-red: #ef4444;
    --info-cyan: #06b6d4;
}

/* Global Blue Theme Styles */
body {
    background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--bg-secondary) 100%);
    color: var(--text-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Enhanced Card Designs */
.card {
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
    background: var(--bg-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--accent-blue);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Primary Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: white !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--primary-blue) 100%);
    color: white !important;
}

.btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.2;
}

/* Ensure all colored backgrounds have white text */
.bg-primary, .bg-secondary, .bg-success, .bg-danger, .bg-warning, .bg-info, .bg-dark {
    color: white !important;
}

.alert-primary, .alert-secondary, .alert-success, .alert-danger, .alert-warning, .alert-info {
    color: white !important;
}

/* Global white text enforcement for all pages */
body * {
    color: white !important;
}

/* Override for specific elements that should remain blue */
.btn-primary, .btn-outline-primary,
.card-header, .bg-primary,
.text-primary, .link-primary,
.badge-primary, .alert-primary {
    color: white !important;
}

/* Special cases - keep blue accent colors */
.text-blue, .accent-blue,
.primary-blue, .link-blue {
    color: var(--primary-blue) !important;
}

/* Form controls and inputs */
.form-control, .form-select, .form-check-input {
    color: white !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.form-control:focus, .form-select:focus {
    color: white !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
    border-color: var(--primary-blue) !important;
}

/* Labels and form text */
label, .form-label, .form-text {
    color: white !important;
}

.display-1, .display-2, .display-3, .display-4 {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-navy) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.text-primary {
    color: var(--primary-blue) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.lead {
    color: var(--text-light);
    font-size: 1.125rem;
    font-weight: 400;
}

/* Alert Components */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-primary {
    background: linear-gradient(135deg, var(--light-blue) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: var(--primary-blue-dark);
    border-left: 4px solid var(--primary-blue);
}

.alert-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
    color: var(--info-cyan);
    border-left: 4px solid var(--info-cyan);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    color: var(--success-green);
    border-left: 4px solid var(--success-green);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
    color: var(--warning-amber);
    border-left: 4px solid var(--warning-amber);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.05) 100%);
    color: var(--danger-red);
    border-left: 4px solid var(--danger-red);
}

/* Badge Styles */
.badge {
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-primary {
    background: var(--primary-blue) !important;
    color: white !important;
}

.badge.bg-success {
    background: var(--success-green) !important;
    color: white !important;
}

.badge.bg-warning {
    background: var(--warning-amber) !important;
    color: white !important;
}

.badge.bg-info {
    background: var(--info-cyan) !important;
    color: white !important;
}

/* Form Controls */
.form-control {
    border-radius: 12px;
    border: 2px solid var(--border-light);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-primary);
}

.form-select {
    border-radius: 12px;
    border: 2px solid var(--border-light);
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
}

.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Navigation Enhancements */
.navbar {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-navy) 100%) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
    padding: 1rem 0;
    min-height: 70px;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: white !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.25rem;
    padding: 0.75rem 1rem !important;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
}

.admin-link {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Table Styles */
.table {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    border-color: var(--border-light);
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--very-light-blue);
}

/* Progress Bars */
.progress {
    height: 12px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    color: white !important;
}

/* List Group */
.list-group-item {
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: var(--very-light-blue);
    border-color: var(--accent-blue);
}

.list-group-item.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border-color: var(--primary-blue);
}

/* Custom Components */
.feature-highlight {
    background: linear-gradient(135deg, var(--very-light-blue) 0%, rgba(255, 255, 255, 0.8) 100%);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-highlight:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(37, 99, 235, 0.12);
    border-color: var(--accent-blue);
}

.feature-highlight i {
    color: var(--primary-blue);
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-highlight h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.feature-highlight p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Status Indicators */
.status-online {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    color: var(--success-green);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success-green);
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-offline {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.1) 0%, rgba(203, 213, 225, 0.05) 100%);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-offline::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
    /* Mobile Text Contrast Override */
    body {
        background: var(--bg-primary) !important;
        color: var(--text-dark) !important;
    }
    
    /* Global container adjustments */
    .container, .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
        color: var(--text-dark) !important;
    }
    
    /* Card improvements */
    .card {
        border-radius: 12px;
        margin-bottom: 1rem;
        box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
    }
    
    .card-header {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Button improvements */
    .btn-primary, .btn-outline-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-height: 44px; /* Touch-friendly minimum */
        border-radius: 8px;
    }
    
    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        min-height: 36px;
    }
    
    /* Navigation improvements */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Form improvements */
    .form-control, .form-select {
        padding: 0.75rem;
        font-size: 1rem;
        min-height: 44px;
        border-radius: 8px;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    /* Feature cards */
    .feature-highlight {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .feature-highlight i {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .feature-highlight h3 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    /* Table improvements */
    .table-responsive {
        border-radius: 8px;
        overflow: hidden;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th, .table td {
        padding: 0.75rem 0.5rem;
        vertical-align: middle;
    }
    
    /* Modal improvements */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 1rem;
    }
    
    /* Alert improvements */
    .alert {
        padding: 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-dark: #f8fafc;
        --text-light: #cbd5e1;
        --text-muted: #94a3b8;
        --border-light: #334155;
        --border-medium: #475569;
    }
    
    body {
        background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    }
    
    .card {
        background: var(--bg-secondary);
        border-color: var(--border-light);
    }
    
    .table {
        background: var(--bg-secondary);
    }
}

/* Linked Networks Specific Styles */
.spotter-report {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-blue);
    transition: all 0.3s ease;
}

.spotter-report:hover {
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateX(2px);
}

.spotter-info strong {
    color: var(--primary-blue);
    font-weight: 600;
}

.spotter-info small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.spotter-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.spotter-status.active {
    background: var(--success-color);
    color: white;
}

.spotter-status.standby {
    background: var(--warning-color);
    color: white;
}

.weather-report {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.weather-report:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.1);
}

.report-event {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.report-location {
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.report-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.skywarn-activation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.skywarn-activation:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
}

.activation-region {
    font-weight: 600;
    color: var(--text-dark);
}

.activation-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.skywarn-activation.active .activation-status {
    background: var(--danger-color);
    color: white;
}

.skywarn-activation.standby .activation-status {
    background: var(--warning-color);
    color: white;
}

.skywarn-activation.normal .activation-status {
    background: var(--success-color);
    color: white;
}

.activation-detail {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.weather-alert {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-blue);
    background: rgba(var(--primary-rgb), 0.05);
    transition: all 0.3s ease;
}

.weather-alert:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

.weather-alert.active {
    border-left-color: var(--success-color);
    background: rgba(34, 197, 94, 0.05);
}

.weather-alert.moderate {
    border-left-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.05);
}

.weather-alert.severe {
    border-left-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
}

.loading-message {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
}

.no-alerts {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
    background: rgba(var(--primary-rgb), 0.02);
    border-radius: 6px;
}

.network-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.activity-region {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all 0.3s ease;
}

.activity-region:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.1);
    transform: translateY(-2px);
}

.activity-region h6 {
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.activity-stats {
    color: var(--text-dark);
    font-size: 0.9rem;
}

.activity-stats span {
    font-weight: 700;
    color: var(--primary-blue);
}

.skywarn-stat {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Network Cards */
.network-card {
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.network-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
    transform: translateY(-2px);
}

.skywarn-card .card-header {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.spotter-card .card-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
}

.network-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    background: rgba(var(--primary-rgb), 0.02);
    border-radius: 6px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-item strong {
    display: block;
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.stat-item small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.alert-section {
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-light);
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}