:root {
    --primary-blue: #2563EB;
    /* Blue 600 */
    --primary-blue-hover: #1D4ED8;
    --sidebar-bg: #FFFFFF;
    --sidebar-text: #64748B;
    /* Slate 500 */
    --sidebar-text-active: #0F172A;
    /* Slate 900 */
    --sidebar-bg-active: #EFF6FF;
    /* Blue 50 */
    --bg-body: #F8FAFC;
    /* Slate 50 */
    --card-bg: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --success-green: #10B981;
    --warning-orange: #F59E0B;
    --danger-red: #EF4444;
    --border-color: #E2E8F0;
    --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);
}

body {
    background-color: var(--bg-body);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
}

/* Sidebar Overrides - Removed for Global Sync */
/* .sidebar { width: 250px; ... } - REPLACED BY GLOBAL 280px */
/* .main-wrapper { margin-left: 250px; ... } - REPLACED BY GLOBAL 280px */

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.header-title h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.btn-generate {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.btn-generate:hover {
    background-color: var(--primary-blue-hover);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 160px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin-top: auto;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

/* Colors for specific stats */
.bg-blue-light {
    background-color: #DBEAFE;
    color: #2563EB;
}

.bg-purple-light {
    background-color: #F3E8FF;
    color: #9333EA;
}

.bg-green-light {
    background-color: #D1FAE5;
    color: #059669;
}

.bg-orange-light {
    background-color: #FFEDD5;
    color: #EA580C;
}

.text-blue {
    color: #2563EB;
}

.text-purple {
    color: #9333EA;
}

.text-green {
    color: #059669;
}

.text-orange {
    color: #EA580C;
}

.badge-green {
    background-color: #DCFCE7;
    color: #166534;
}

.badge-red {
    background-color: #FEE2E2;
    color: #991B1B;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    min-height: 400px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* Right Column Widgets */
.network-search-card {
    background-color: #0F172A;
    /* Dark Navy */
    color: white;
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.search-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-desc {
    color: #94A3B8;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.search-input-group {
    position: relative;
}

.search-input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: white;
    font-size: 0.9rem;
}

.btn-lookup {
    position: absolute;
    right: 5px;
    top: 5px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.8rem;
}

.pulse-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.pulse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.badge-live {
    background-color: #FEE2E2;
    color: #991B1B;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.pulse-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pulse-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.pulse-icon {
    width: 32px;
    height: 32px;
    background-color: #F1F5F9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary-blue);
}

.pulse-content h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.pulse-content p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.pulse-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Bottom Banner */
.automation-banner {
    background: linear-gradient(90deg, #1E293B 0%, #312E81 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.banner-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.banner-text h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
    text-transform: uppercase;
}

.banner-text p {
    color: #94A3B8;
    margin: 0;
    max-width: 500px;
    font-size: 0.9rem;
}

.banner-actions {
    display: flex;
    gap: 1rem;
}

.btn-activate {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.btn-explore {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .automation-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .banner-actions {
        width: 100%;
    }
}