/* Nuronus Scout - Common Styles for All Pages */

/* CSS Variables for consistent theming */
:root {
    /* Primary Brand Colors */
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #7c3aed;
    --secondary: #764ba2;
    
    /* Background Colors */
    --bg: #f7fafc;
    --card-bg: #ffffff;
    --hover-bg: #f0f4f8;
    
    /* Text Colors */
    --text: #2d3748;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    
    /* Border and Shadow */
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Status Colors */
    --success: #48bb78;
    --warning: #ed8936;
    --error: #f56565;
    --info: #4299e1;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Font Families */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
    
    /* Additional common styles */
    --primary-dark: #5a67d8;
    --primary-light: #7c3aed;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg: #1a202c;
    --card-bg: #2d3748;
    --hover-bg: #4a5568;
    --text: #e2e8f0;
    --text-secondary: #cbd5e0;
    --text-muted: #718096;
    --border: #4a5568;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    line-height: 1.2;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
    color: var(--primary);
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--space-md);
    color: var(--primary);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

h4 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
}

.container-fluid {
    padding: var(--space-xl);
}

/* Card Component */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.btn-primary:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--hover-bg);
}

/* Form Styles */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th,
.table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--hover-bg);
    font-weight: 600;
    color: var(--text);
}

.table tbody tr:hover {
    background: var(--hover-bg);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: var(--success);
}

.badge-warning {
    background: var(--warning);
}

.badge-error {
    background: var(--error);
}

.badge-info {
    background: var(--info);
}

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

.alert-info {
    background: rgba(66, 153, 225, 0.1);
    border-color: var(--info);
    color: var(--info);
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(237, 137, 54, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-error {
    background: rgba(245, 101, 101, 0.1);
    border-color: var(--error);
    color: var(--error);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: var(--space-2xl) 0;
    margin-bottom: var(--space-2xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.133 7-7s-3.134-7-7-7-7 3.133-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.133 7-7s-3.134-7-7-7-7 3.133-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,0.05)' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.page-header h1 {
    color: white;
    margin: 0;
    position: relative;
    z-index: 1;
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: var(--space-md) 0 0 0;
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mt-5 { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mb-5 { margin-bottom: var(--space-2xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-sm); }
.p-2 { padding: var(--space-md); }
.p-3 { padding: var(--space-lg); }
.p-4 { padding: var(--space-xl); }
.p-5 { padding: var(--space-2xl); }

/* Responsive Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.nav-collapsed {
    margin-left: 0;
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
    }
    
    .container {
        padding: var(--space-md);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Code Blocks */
pre {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    overflow-x: auto;
    font-family: var(--font-mono);
}

code {
    background: var(--hover-bg);
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875em;
}

pre code {
    background: none;
    padding: 0;
}

/* Nuronus Scout Branding */
.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.brand-logo {
    width: 60px;
    height: 60px;
}

.brand-text {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Footer Styles */
.page-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    margin-top: var(--space-2xl);
    padding: var(--space-2xl) 0 var(--space-lg) 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-section h4 {
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.footer-bottom p {
    margin: var(--space-xs) 0;
}

/* Breadcrumb Styles */
.breadcrumb-nav {
    background: var(--hover-bg);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-muted);
}