/**
 * Seven Hub - Premium Enterprise Launcher Standard
 * Seven Design System (SDS) v5.0 - Premium Dark Mode
 */

:root {
    --primary: #004218;
    --primary-glow: rgba(0, 66, 24, 0.5);
    --bg-main: #0B0C0E; /* Soft Black */
    --surface: #15171A; /* Deep Gray */
    --surface-hover: #1C1F23;
    --divider: #24282D;

    --text-primary: #FFFFFF;
    --text-secondary: #8E9196;
    --text-muted: #5C5F66;

    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-soft: 0 8px 32px rgba(0,0,0,0.5);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    margin: 0; padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    display: flex;
}

/* --- Layout Architecture --- */
.sds-hub-layout {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 100vw;
}

/* 1. SIDEBAR (Persistent) */
.sds-sidebar {
    width: 280px;
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--divider);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition);
    z-index: 1000;
}

.sds-sidebar-header {
    padding: 32px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sds-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 32px;
}

.sds-nav-group { margin-top: 24px; }
.sds-nav-title {
    font-size: 10px; font-weight: 800; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.15em;
    padding: 0 16px 12px;
}

.sds-nav-item {
    width: 100%;
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: 16px;
    color: var(--text-secondary); font-size: 13px; font-weight: 700;
    cursor: pointer; transition: var(--transition);
    border: none; background: transparent; text-align: left;
    margin-bottom: 4px;
}

.sds-nav-item:hover { background: var(--surface-hover); color: white; }
.sds-nav-item--active { background: var(--primary); color: white; box-shadow: 0 8px 24px var(--primary-glow); }

/* 2. MAIN VIEWPORT */
.sds-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--bg-main);
}

.sds-topbar {
    height: 80px;
    padding: 0 40px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(11, 12, 14, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--divider);
    z-index: 900;
    position: sticky;
    top: 0;
}

.sds-main-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 360px; /* Dashboard / Intelligence Split */
    gap: 48px;
}

/* 3. APP CARDS (Launcher Grid) */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.app-card {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.app-card:hover {
    transform: translateY(-6px);
    background: var(--surface-hover);
    border-color: var(--text-muted);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.app-icon {
    width: 60px; height: 60px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    background: var(--bg-main);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.app-card:hover .app-icon { transform: scale(1.1); }

.app-status {
    position: absolute; top: 16px; right: 16px;
    display: flex; align-items: center; gap: 6px;
}

.status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #10B981; box-shadow: 0 0 10px #10B981;
}

/* 4. INTEL PANEL (Sticky Right) */
.intelligence-panel {
    display: flex; flex-direction: column; gap: 32px;
}

.sds-widget {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--divider);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.sds-widget--ai::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), #10B981);
}

/* 5. SEARCH (Universal Input) */
.sds-search-bar {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: 18px;
    height: 48px;
    width: 480px;
    display: flex; align-items: center; padding: 0 20px;
    gap: 16px; transition: var(--transition);
}

.sds-search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 24px var(--primary-glow); width: 520px; }
.sds-search-input { background: none; border: none; color: white; outline: none; flex: 1; font-size: 14px; font-weight: 600; }

/* 6. HERO GREETING */
.hub-hero {
    padding: 56px;
    background: linear-gradient(135deg, rgba(0, 66, 24, 0.15) 0%, transparent 100%);
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 56px;
    position: relative;
    overflow: hidden;
}

.hero-aura {
    position: absolute; top: -100px; right: -100px;
    width: 400px; height: 400px; background: var(--primary);
    filter: blur(140px); opacity: 0.15;
}

/* Utilities */
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.animate-fade { animation: fadeIn 500ms ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile Adaptations */
@media (max-width: 1280px) {
    .sds-main-content { grid-template-columns: 1fr; }
    .intelligence-panel { display: none; }
}

@media (max-width: 768px) {
    .sds-sidebar {
        position: fixed; transform: translateX(-100%);
        box-shadow: 20px 0 60px rgba(0,0,0,0.5);
    }
    .sds-sidebar.open { transform: translateX(0); }
    .sds-topbar { padding: 0 24px; }
    .sds-search-bar { width: 100%; flex: 1; }
    .hub-hero { padding: 32px; border-radius: 28px; }
}
