/* ===== ROOT – NO ROUNDED EDGES, PLAIN COLORS ===== */
:root {
    --bg-deep: #090909;
    --bg-surface: #111111;
    --bg-card: #1a1a1a;
    --bg-elevated: #222222;
    --border-color: #2d2d2d;
    --accent: #5200ff;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #666666;
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
    --header-height: 64px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Core Colors - Keeping your requested palette */
    --color-bg: #090909;
    --color-primary: #5200ff;
    --color-primary-dark: #3a00b8;
    --color-primary-light: #6d28d9;
    --color-primary-glow: rgba(82, 0, 255, 0.2);
    
    /* Extended Palette */
    --color-surface: #111111;
    --color-surface-light: #1a1a1a;
    --color-surface-dark: #050505;
    --color-border: #222222;
    --color-border-light: #333333;
    --color-hive-image: #121212;
    
    /* Text Colors */
    --color-text: #ffffff;
    --color-text-secondary: #a0a0a0;
    --color-text-tertiary: #666666;
    
    /* Accent Colors */
    --color-accent: #1900ff;
    --color-success: #6150ff;
    --color-warning: #ffb800;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px var(--color-primary-glow);

    /* Heatmap */
    --color-heat-1: rgba(82, 0, 255, 0.05);
    --color-heat-2: rgba(82, 0, 255, 0.1);
    --color-heat-3: rgba(82, 0, 255, 0.15);
    --color-heat-4: rgba(82, 0, 255, 0.2);
    --color-heat-5: rgba(82, 0, 255, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important;
}

html {
    background: var(--bg-deep);
}

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

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: width var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}
.sidebar.collapsed .sidebar-header,
.sidebar.collapsed .sidebar-header,
.sidebar.collapsed .nav-links a span,
.sidebar.collapsed .nav-title,
.sidebar.collapsed .nav-links a .status-dot,
.sidebar.collapsed .sidebar-footer span {
    display: none;
}
.sidebar.collapsed .nav-links a i {
    margin-right: 0;
    font-size: 1.2rem;
}
.sidebar.collapsed .nav-links a {
    justify-content: center;
    padding: 0.7rem;
}
.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 1rem 0.5rem;
}
.sidebar.collapsed .sidebar-footer {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}
.sidebar.collapsed .sidebar-footer i {
    margin-right: 0;
}

.sidebar-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: padding var(--transition);
}

.logo-icon {
    height: 32px;
    width: auto;
}

.sidebar-nav {
    padding: 1.5rem 1rem;
    flex: 1;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-title {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--text-muted);
    padding: 0 0.75rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    transition: opacity var(--transition);
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 0.15rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all var(--transition);
    position: relative;
}

.nav-links a i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.nav-links a:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}
.nav-links a:hover i {
    opacity: 1;
}

.nav-links a.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-left: 5px solid var(--accent);
}
.nav-links a.active i {
    opacity: 1;
    color: var(--accent);
}

.nav-links a .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 0 !important;
    display: inline-block;
    margin-left: auto;
    flex-shrink: 0;
    background: var(--accent);
}
.status-dot.live {
    background: #00ff88;
}
.status-dot.warning {
    background: #ffaa00;
}
.status-dot.offline {
    background: var(--text-muted);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: padding var(--transition);
}
.sidebar-footer i {
    color: var(--accent);
}

/* ===== MAIN ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed);
}

/* ===== HEADER ===== */
.top-header {
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: background 0.2s;
}
.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.3px;
}
.dropdown-hover {
    position: relative;
    display: inline-block;
    padding-right: 50px;
}
.dropdown-button {
    position: relative;
    display:inline-flex;
    align-items: center;
    width: 100px;
    background-color: transparent;
    padding: 0.4rem;
    border: 1px solid var(--color-text-secondary);
    cursor: pointer;
    color: var(--color-text);
}
.svg-region {
    padding-right: 0.5rem;
    padding-left: 0.2rem;
    width: 2rem;
    height: auto;
}
.dropdown-content {
    display:none;
    position:absolute;
    background-color:var(--color-surface);
    min-width:160px;
    box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index:1;
}
.dropdown-content .bar-item {
    color:var(--color-text);
    padding:12px 16px;
    text-decoration:none;
    display:block;
}
.dropdown-content .bar-item:hover {
    background-color:var(--color-border);
}
.dropdown-hover:hover .dropdown-content {
    display:block
}
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.3px;
}
.header-status .pulse {
    width: 8px;
    height: 8px;
    background: #00ff88;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.header-actions button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    transition: all 0.2s;
}
.header-actions button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.header-avatar {
    width: 32px;
    height: 32px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}

/* ===== CONTENT ===== */
.content-area {
    padding: 2rem 2rem 4rem;
    width: 100%;
    flex: 1;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}
.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover {
    color: var(--text-primary);
}
.breadcrumb i {
    font-size: 0.6rem;
    opacity: 0.4;
}
.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== DOC SECTIONS ===== */
.doc-section {
    display: none;
    animation: fadeSlide 0.3s ease;
}
.doc-section.active {
    display: block;
}

@keyframes fadeSlide {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 2.5rem;
}
.section-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}
.section-header h1 i {
    color: var(--accent);
    font-size: 1.8rem;
}
.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.4rem;
}

/* ===== TOOLS GRID ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
}
.tool-card:hover {
    border-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.tool-icon {
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    display: inline-block;
    padding: 0.5rem;
    line-height: 1;
}

.tool-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    letter-spacing: -0.2px;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tool-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.tech-tag {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    padding: 0.15rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* ===== USE CASE GRID ===== */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.use-case-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.use-case-card:hover {
    border-color: var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.use-case-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.use-case-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
    flex-shrink: 0;
}
.use-case-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.use-case-card>p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tool-list {
    list-style: none;
}
.tool-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.tool-list li:last-child {
    border-bottom: none;
}
.tool-list li i {
    color: var(--accent);
    font-size: 0.7rem;
    opacity: 0.7;
}
.tool-list li strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
    }
    .mobile-toggle {
        display: block;
    }
    .sidebar-toggle {
        display: none;
    }
    .top-header {
        padding: 0 1rem;
    }
    .header-status {
        display: none;
    }
}

@media (max-width: 768px) {
    .tools-grid,
    .use-case-grid {
        grid-template-columns: 1fr;
    }
    .content-area {
        padding: 1rem 1rem 3rem;
    }
    .section-header h1 {
        font-size: 1.4rem;
        flex-wrap: wrap;
    }
    .metric-row {
        grid-template-columns: 1fr 1fr;
    }
    .header-actions button {
        display: none;
    }
    .header-actions .header-avatar {
        display: flex;
    }
}

@media (max-width: 480px) {
    .metric-row {
        grid-template-columns: 1fr;
    }
}