﻿/* ============================================================
   VertexIQ Mobility — Stylesheet
   Theme: Dark Chrome | Light Content
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* ─────────────────────────────────────────
   CSS VARIABLES
───────────────────────────────────────── */
:root {
    --bg-base: #0b0f2a;
    --bg-surface: #111535;
    --bg-card: #161b40;
    --bg-card-hover: #1c2249;
    --bg-input: #1a1f45;
    --border-color: #2a3060;
    --border-subtle: #1e2448;
    --text-primary: #e8eaf6;
    --text-secondary: #8892b0;
    --text-muted: #4a5280;
    --text-accent: #ffffff;
    --sidebar-width: 80px;
    --sidebar-bg: #0d1130;
    --sidebar-border: #1a1f45;
    --topbar-height: 56px;
    --topbar-bg: #111535;
    --accent-blue: #4f8ef7;
    --accent-blue-glow: rgba(79, 142, 247, 0.15);
    --accent-purple: #7c3aed;
    --accent-teal: #06b6d4;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #4f8ef7;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow-card: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-glow: 0 0 20px rgba(79, 142, 247, 0.12);
    --transition: all 0.2s ease;
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

    a:hover {
        color: #7aa8fb;
    }

/* ─────────────────────────────────────────
   TOP NAV — DARK
───────────────────────────────────────── */
.top-nav {
    height: var(--topbar-height);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.top-nav-logo {
    width: var(--sidebar-width);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-right: 1px solid var(--border-subtle);
    height: 100%;
}

.logo {
    height: 64px;
}

.top-nav-left {
    display: flex;
    align-items: center;
    padding-left: 16px;
    flex: 1;
}

.app-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    letter-spacing: 0.5px;
}

    .app-title .vertex {
        font-weight: 700;
        color: var(--text-accent);
    }

    .app-title .iq {
        font-weight: 700;
        color: var(--accent-blue);
    }

    .app-title .mobility {
        font-weight: 400;
        color: var(--text-secondary);
    }

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 20px;
    margin-left: auto;
}

.user-name {
    color: var(--text-secondary);
    font-size: 13px;
}

.btn-ai {
    background: var(--accent-blue);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

    .btn-ai:hover {
        background: #3a7ae8;
        box-shadow: var(--shadow-glow);
    }

.btn-logout {
    color: var(--text-secondary);
    font-size: 18px;
    text-decoration: none;
    transition: var(--transition);
}

    .btn-logout:hover {
        color: var(--text-accent);
    }

/* ─────────────────────────────────────────
   APP CONTAINER
───────────────────────────────────────── */
.app-container {
    display: flex;
    height: calc(100vh - var(--topbar-height));
    margin-top: var(--topbar-height);
}

/* ─────────────────────────────────────────
   LEFT TOOLBAR — DARK
───────────────────────────────────────── */
.left-toolbar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 16px;
    gap: 4px;
    flex-shrink: 0;
}

.toolbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

    .toolbar-item i {
        font-size: 18px;
    }

    .toolbar-item:hover {
        background: var(--bg-card);
        color: var(--text-primary);
    }

    .toolbar-item.active {
        background: var(--accent-blue-glow);
        color: var(--accent-blue);
        box-shadow: 0 0 0 1px rgba(79, 142, 247, 0.2);
    }

        /*.toolbar-item.active::before {
            content: '';
            position: absolute;
            left: -1px;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 20px;
            background: var(--accent-blue);
            border-radius: 0 3px 3px 0;
        }*/

/* ─────────────────────────────────────────
   MAIN CONTENT — LIGHT
───────────────────────────────────────── */
.main-content {
    flex: 1;
    overflow: hidden;
    padding: 24px;
    background: #f0f2f5;
}

    .main-content.map-page {
        padding: 0;
        overflow: hidden;
    }

/* ─────────────────────────────────────────
   AI SLIDING PANEL — DARK
───────────────────────────────────────── */
.ai-panel {
    position: fixed;
    top: var(--topbar-height);
    right: -480px;
    width: 480px;
    height: calc(100vh - var(--topbar-height));
    background: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 20px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    z-index: 999;
}

    .ai-panel.open {
        right: 0;
    }

.ai-panel-header {
    padding: 16px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
}

.btn-close-panel {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

    .btn-close-panel:hover {
        background: var(--bg-card-hover);
        color: var(--text-primary);
    }

.ai-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.ai-welcome {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    font-style: italic;
}

.ai-panel-pills {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid var(--border-color);
    overflow-y: auto;
    max-height: 280px;
}

.pill {
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

    .pill:hover {
        border-color: var(--accent-blue);
        color: var(--text-primary);
        background: var(--accent-blue-glow);
    }

.ai-panel-input {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

    .ai-panel-input input {
        flex: 1;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        padding: 10px 14px;
        font-size: 13px;
        outline: none;
        background: var(--bg-input);
        color: var(--text-primary);
        font-family: 'Plus Jakarta Sans', sans-serif;
        transition: var(--transition);
    }

        .ai-panel-input input::placeholder {
            color: var(--text-muted);
        }

        .ai-panel-input input:focus {
            border-color: var(--accent-blue);
            box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.1);
        }

    .ai-panel-input button {
        background: var(--accent-blue);
        border: none;
        color: white;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
    }

        .ai-panel-input button:hover {
            background: #3a7ae8;
        }

/* Pills label */
.pills-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 4px 0 2px 0;
}

/* Link pills - slightly different style */
.pill-link {
    border-color: var(--accent-blue) !important;
    color: var(--accent-blue) !important;
}

    .pill-link:hover {
        background: var(--accent-blue-glow) !important;
    }

/* Chat messages */
.ai-msg-user {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

    .ai-msg-user span {
        background: var(--accent-blue);
        color: white;
        padding: 8px 12px;
        border-radius: 12px 12px 2px 12px;
        font-size: 12px;
        max-width: 85%;
        line-height: 1.5;
    }

.ai-msg-assistant {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

    .ai-msg-assistant span {
        background: var(--bg-card);
        color: var(--text-primary);
        padding: 8px 12px;
        border-radius: 12px 12px 12px 2px;
        font-size: 12px;
        max-width: 85%;
        line-height: 1.5;
        border: 1px solid var(--border-color);
    }

/* Typing indicator */
.ai-typing span {
    background: var(--bg-card) !important;
    padding: 10px 16px !important;
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted) !important;
    border-radius: 50%;
    animation: typingBounce 1.2s infinite;
    display: inline-block !important;
}

    .typing-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-6px);
    }
}

.ai-msg-assistant span p {
    margin: 0 0 10px 0;
}

    .ai-msg-assistant span p:last-child {
        margin-bottom: 0;
    }

.ai-msg-assistant span ul {
    margin: 6px 0 10px 0;
    padding-left: 18px;
}

.ai-msg-assistant span li {
    margin-bottom: 4px;
    line-height: 1.5;
}

.ai-msg-assistant span h2,
.ai-msg-assistant span h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 12px 0 6px 0;
}

.ai-msg-assistant span strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* ─────────────────────────────────────────
   DASHBOARD — LIGHT CONTENT
───────────────────────────────────────── */
.dashboard-container {
    max-width: 1400px;
}

.page-header {
    margin-bottom: 24px;
}

    .page-header h1 {
        font-size: 22px;
        font-weight: 700;
        color: #1a1a2e;
        font-family: 'Montserrat', sans-serif;
    }

        .page-header h1 span {
            color: var(--accent-blue);
        }

    .page-header p {
        color: #718096;
        font-size: 13px;
        margin-top: 4px;
    }

/* KPI CARDS */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

    .kpi-card:hover {
        background: #f8f9ff;
        border-color: var(--accent-blue);
    }

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

    .kpi-icon.blue {
        background: var(--accent-blue-glow);
        color: var(--accent-blue);
    }

    .kpi-icon.green {
        background: var(--success-bg);
        color: var(--success);
    }

    .kpi-icon.orange {
        background: rgba(245, 158, 11, 0.12);
        color: var(--warning);
    }

    .kpi-icon.red {
        background: rgba(239, 68, 68, 0.12);
        color: var(--danger);
    }

.kpi-info {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    font-family: 'Montserrat', sans-serif;
}

.kpi-label {
    font-size: 11px;
    color: #718096;
    margin-top: 2px;
    font-weight: 500;
}

/* DASHBOARD GRID */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

    .card-header h2 {
        font-size: 13px;
        font-weight: 700;
        color: #1a1a2e;
        display: flex;
        align-items: center;
        gap: 8px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

        .card-header h2 i {
            color: var(--accent-blue);
        }

.card-body {
    padding: 20px;
    background: #ffffff;
}

.placeholder-text {
    color: #a0aec0;
    font-size: 13px;
    font-style: italic;
}

/* REPORT LINKS */
.report-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a5568;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
    background: #f8f9ff;
    transition: var(--transition);
}

    .report-link:hover {
        background: #eef2ff;
        border-color: var(--accent-blue);
        color: #1a1a2e;
    }

    .report-link i {
        font-size: 15px;
        width: 20px;
    }

        .report-link i.fa-file-pdf {
            color: var(--danger);
        }

        .report-link i.fa-file-excel {
            color: var(--success);
        }
