/*
 * INTEGRO - Digital Protection Platform
 * Main Stylesheet
 * Brand Color: #00875A (Green)
 */

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Brand Colors */
    --integro-primary: #00875A;
    --integro-primary-light: #00A86B;
    --integro-primary-dark: #004D40;
    --integro-secondary: #2E7D32;
    --integro-accent: #00E676;
    
    /* Gradients */
    --integro-gradient: linear-gradient(135deg, #00875A 0%, #004D40 50%, #2E7D32 100%);
    --integro-gradient-light: linear-gradient(135deg, #00A86B 0%, #00875A 100%);
    --integro-gradient-radial: radial-gradient(circle at 30% 30%, #00A86B, #00875A, #004D40);
    
    /* Risk Colors */
    --risk-low: #10b981;
    --risk-moderate: #f59e0b;
    --risk-high: #f97316;
    --risk-critical: #ef4444;
    
    /* UI Colors */
    --bg-dark: #0a0f0a;
    --bg-card: rgba(20, 30, 20, 0.8);
    --bg-card-hover: rgba(30, 45, 30, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #a3b3a3;
    --text-muted: #6b7b6b;
    --border-color: rgba(0, 135, 90, 0.3);
    
    /* Glassmorphism */
    --glass-bg: rgba(0, 135, 90, 0.08);
    --glass-border: rgba(0, 135, 90, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 135, 90, 0.15);
    
    /* Spacing */
    --navbar-height: 70px;
    --sidebar-width: 280px;
}

/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

body.landing-page {
    background: linear-gradient(135deg, #0a0f0a 0%, #0a1a0a 50%, #0a0f0a 100%);
}

/* Background Animation */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-animated::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at 20% 80%, rgba(0, 135, 90, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(46, 125, 50, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(0, 77, 64, 0.08) 0%, transparent 40%);
    animation: bgFloat 30s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-5%, 5%) rotate(2deg); }
    50% { transform: translate(5%, -5%) rotate(-2deg); }
    75% { transform: translate(-3%, -3%) rotate(1deg); }
}

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

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

a:hover {
    color: var(--integro-primary-light);
}

.gradient-text {
    background: var(--integro-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ==================== GLASSMORPHISM COMPONENTS ==================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 135, 90, 0.25);
    border-color: rgba(0, 135, 90, 0.4);
}

.glass-card-static {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
}

/* ==================== NAVBAR ==================== */
.integro-navbar {
    height: var(--navbar-height);
    background: rgba(10, 15, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
}

.navbar-brand:hover {
    color: var(--text-primary);
}

.navbar-brand .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--integro-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.navbar-brand span {
    background: var(--integro-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary) !important;
    background: var(--glass-bg);
}

/* ==================== SIDEBAR ==================== */
.integro-sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: rgba(15, 20, 15, 0.95);
    border-right: 1px solid var(--glass-border);
    padding: 1.5rem 1rem;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-nav-link:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.sidebar-nav-link.active {
    color: white;
    background: var(--integro-gradient);
}

.sidebar-nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin: 1.5rem 0 0.5rem 1rem;
    font-weight: 600;
}

/* ==================== MAIN CONTENT ==================== */
.integro-main {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    padding: 2rem;
    min-height: calc(100vh - var(--navbar-height));
}

.integro-main.full-width {
    margin-left: 0;
}

/* ==================== BUTTONS ==================== */
.btn-integro {
    background: var(--integro-gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-integro::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: 0.5s;
}

.btn-integro:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 135, 90, 0.4);
    color: white;
}

.btn-integro:hover::before {
    left: 100%;
}

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

.btn-integro-outline:hover {
    background: var(--integro-gradient);
    color: white;
    border-color: transparent;
}

.btn-glass {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: rgba(0, 135, 90, 0.15);
    border-color: var(--integro-primary);
    color: var(--text-primary);
}

/* ==================== FORMS ==================== */
.form-control, .form-select {
    background: rgba(20, 30, 20, 0.8);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: rgba(30, 45, 30, 0.9);
    border-color: var(--integro-primary);
    box-shadow: 0 0 0 3px rgba(0, 135, 90, 0.2);
    color: var(--text-primary);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-check-input {
    background-color: var(--glass-bg);
    border-color: var(--glass-border);
}

.form-check-input:checked {
    background-color: var(--integro-primary);
    border-color: var(--integro-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 135, 90, 0.2);
}

/* ==================== CARDS ==================== */
.dashboard-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--integro-primary);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--integro-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ==================== RISK COLORS ==================== */
.risk-low { color: var(--risk-low); }
.risk-moderate { color: var(--risk-moderate); }
.risk-high { color: var(--risk-high); }
.risk-critical { color: var(--risk-critical); }

.stroke-low { stroke: var(--risk-low); }
.stroke-moderate { stroke: var(--risk-moderate); }
.stroke-high { stroke: var(--risk-high); }
.stroke-critical { stroke: var(--risk-critical); }

/* ==================== FINDINGS ==================== */
.finding-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.finding-card:hover {
    border-color: var(--integro-primary);
    transform: translateX(5px);
}

.finding-card.severity-critical { border-left: 4px solid var(--risk-critical); }
.finding-card.severity-high { border-left: 4px solid var(--risk-high); }
.finding-card.severity-medium { border-left: 4px solid var(--risk-moderate); }
.finding-card.severity-low { border-left: 4px solid var(--text-muted); }

/* ==================== ALERTS ==================== */
.alert {
    border-radius: 12px;
    border: none;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--risk-low);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--risk-critical);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--risk-moderate);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ==================== BADGES ==================== */
.badge-integro {
    background: var(--integro-gradient);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==================== PROGRESS BAR ==================== */
.progress {
    height: 8px;
    background: rgba(0, 135, 90, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: var(--integro-gradient);
    border-radius: 10px;
}

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

::-webkit-scrollbar-track {
    background: rgba(10, 15, 10, 0.5);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--integro-primary-light);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    .integro-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .integro-sidebar.open {
        transform: translateX(0);
    }
    
    .integro-main {
        margin-left: 0;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 767px) {
    .integro-main {
        padding: 1rem;
    }
    
    .integro-navbar {
        padding: 0 1rem;
    }
    
    .dashboard-card {
        padding: 1rem;
    }
}

/* ==================== UTILITIES ==================== */
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-fadeIn { animation: fadeIn 0.5s ease-out; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease-out; }
.animate-slideInRight { animation: slideInRight 0.5s ease-out; }
