/* Modern Design System for SilentNet */

:root {
    /* Color Palette - Modern & Professional */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Neutral Colors */
    --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;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Platform Tab Styling */
.platform-tabs .nav-pills .nav-link {
    color: var(--gray-600) !important;
    background-color: transparent !important;
    border: 1px solid var(--gray-300) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.platform-tabs .nav-pills .nav-link:hover {
    color: var(--primary) !important;
    background-color: var(--primary-light) !important;
    border-color: var(--primary) !important;
}

.platform-tabs .nav-pills .nav-link.active {
    color: white !important;
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.platform-tabs .nav-pills .nav-link.active:hover,
.platform-tabs .nav-pills .nav-link.active:focus {
    color: white !important;
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: white;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    padding: var(--space-md) 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

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

.nav-link {
    color: var(--gray-600) !important;
    font-weight: 500;
    padding: var(--space-sm) var(--space-md) !important;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: var(--primary) !important;
    background-color: var(--primary-light);
}

.nav-link.active {
    color: var(--primary) !important;
    background-color: var(--primary-light);
}

/* Container */
.app-container {
    min-height: calc(100vh - 140px);
    padding: var(--space-xl) 0;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-lg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-title {
    margin: 0;
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1.25rem;
}

.card-body {
    padding: var(--space-lg);
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Forms */
.form-control {
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

/* Input Group Modern Styling */
.input-group-modern {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group-modern .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    color: var(--gray-400);
    font-size: 16px;
    pointer-events: none;
}

.input-group-modern .form-control {
    padding-left: 48px;
    font-size: 16px;
    font-weight: 400;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: white;
    color: var(--gray-700);
    transition: all 0.2s ease;
}

.input-group-modern .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.input-group-modern .form-control::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

/* Analysis Card Styling */
.analysis-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.analysis-card .card-body {
    padding: 2rem;
}

/* Clean page styling */
.modern-homepage {
    min-height: 100vh;
}

.hero-section {
    position: relative;
}

/* Hero Title Styling */
.hero-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: var(--gray-900) !important;
    letter-spacing: -0.025em !important;
    line-height: 1.2 !important;
}

.hero-subtitle {
    font-size: 1.125rem !important;
    color: var(--gray-600) !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
}

.form-select {
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") no-repeat right 0.75rem center/16px 16px;
}

/* Tables */
.table {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-weight: 600;
    padding: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: var(--gray-50);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

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

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

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

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

.badge.bg-secondary {
    background: var(--gray-500) !important;
    color: white;
}

/* Progress */
.progress {
    height: 0.75rem;
    background: var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.progress-bar {
    border-radius: var(--radius-md);
    transition: width 0.6s ease;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border-left: 4px solid;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left-color: var(--success);
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left-color: var(--warning);
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: var(--danger);
}

.alert-info {
    background: #f0f9ff;
    color: #0c4a6e;
    border-left-color: var(--info);
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-content {
    text-align: center;
    color: var(--gray-700);
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.minimal-footer {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: var(--space-lg) 0;
    margin-top: var(--space-2xl);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Utilities */
.text-muted {
    color: var(--gray-500) !important;
}

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

.bg-light {
    background-color: var(--gray-50) !important;
}

.border-light {
    border-color: var(--gray-200) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        padding: var(--space-md) 0;
    }
    
    .card-body {
        padding: var(--space-md);
    }
    
    .table-responsive {
        border-radius: var(--radius-lg);
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
}

@media (min-width: 769px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.125rem !important;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Timeline Component for User History */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.125rem;
    width: 0.75rem;
    height: 0.75rem;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--gray-200);
    z-index: 1;
}

.timeline-content {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-left: 0.5rem;
}

.timeline-content:hover {
    background: white;
    box-shadow: var(--shadow-sm);
}

/* Smooth Transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}