﻿:root {
    --bg-primary: #0b0f19; /* Deep slate-navy canvas */
    --panel-bg: #121826; /* Slightly lighter container backgrounds */
    --text-primary: #ffffff; /* Crisp white for readable headers */
    --text-secondary: #8a99ad; /* Soft slate-grey for body descriptions */
    --accent: #02c39a; /* Your core structural Teal accent */
    --accent-hover: #00a896; /* Darker, richer Teal for interactive states */
    --border-subtle: #1f293d; /* Clean divider grid lines */
}

/* Fixed universal selector from - to * */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

/* --- Global Header & Navigation (Desktop Default) --- */
header {
    background-color: var(--panel-bg);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: monospace;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.05em;
}

    .logo:hover {
        color: var(--accent);
    }

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

    nav ul li a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 500;
        transition: color 0.2s ease;
    }

        nav ul li a:hover,
        nav ul li a.active {
            color: var(--accent);
        }

        nav ul li a.btn-highlight {
            background-color: transparent;
            color: var(--accent);
            border: 1px solid var(--accent);
            padding: 0.5rem 1rem;
            border-radius: 4px;
            font-weight: 600;
            transition: all 0.2s ease;
        }

            nav ul li a.btn-highlight:hover {
                background-color: var(--accent);
                color: var(--bg-primary);
            }

/* --- Home Page Hero Component --- */
.hero {
    max-width: 900px;
    margin: 5rem auto;
    padding: 0 2rem;
    text-align: center;
}

    .hero h1 {
        font-size: 3rem;
        font-weight: 700;
        margin-bottom: 1.5rem;
        color: var(--text-primary);
        letter-spacing: -0.02em;
    }

    .hero p {
        color: var(--text-secondary);
        font-size: 1.15rem;
        line-height: 1.8;
    }
/* --- Master Timeline Layout Elements --- */

.timeline-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
}

    .timeline-container h1 {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }

    .timeline-container .subtitle {
        color: var(--text-secondary);
        font-size: 1.1rem;
        margin-bottom: 3rem;
    }

/* The Vertical Track Line */
.timeline-axis {
    border-left: 2px solid var(--border-subtle);
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-left: 0.5rem;
}

/* Individual Milestone Cards */
.timeline-card {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    border-radius: 8px;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

    /* Visual Node Indicator Dot on the Left Line */
    .timeline-card::before {
        content: "";
        position: absolute;
        left: calc(-2rem - 7px);
        top: 2.3rem;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: var(--border-subtle);
        border: 2px solid var(--bg-primary);
    }

    /* Style Modifications for Active/In-Progress Milestones */
    .timeline-card.current {
        border-color: var(--accent);
    }

        .timeline-card.current::before {
            background-color: var(--accent);
            box-shadow: 0 0 10px var(--accent);
        }

/* Internal Card Text Spacing */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-card h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.timeline-card p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

/* Custom Checklist Inside the Cards */
.timeline-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

    .timeline-card ul li {
        color: var(--text-secondary);
        font-size: 0.9rem;
        position: relative;
        padding-left: 1.5rem;
    }

        /* Custom Checklist Checkboxes */
        .timeline-card ul li::before {
            content: "☐";
            position: absolute;
            left: 0;
            color: var(--text-secondary);
        }

.timeline-card.current ul li::before {
    color: var(--accent);
}

/* Style Modifications for Active/In-Progress Milestones */
.timeline-card.current {
    border-color: var(--accent);
}

    .timeline-card.current::before {
        background-color: var(--accent);
        box-shadow: 0 0 10px var(--accent);
    }

/* Style Modifications for Completed Milestones */
.timeline-card.complete {
    border-color: #00a896;
    opacity: 0.85;
}

    .timeline-card.complete::before {
        background-color: #00a896;
        box-shadow: none;
    }

    .timeline-card.complete ul li::before {
        content: "✓";
        color: #00a896;
        font-weight: 700;
    }

/* Internal Card Text Spacing */
.card-header {
    display: flex;
}

    /* Status Badges */
    .badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.badge-progress {
    background-color: rgba(2, 195, 154, 0.1);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.badge-future {
    background-color: rgba(138, 153, 173, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- AI Workspace Dashboard Layout Elements --- */

/* The Main Outer Viewport Container Wrapper */
.workspace-wrapper {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    /* Activate CSS Grid for full structural alignment */
    display: grid;
    grid-template-columns: 1fr 1fr; /* Splits desktop space into two equal columns */
    gap: 2rem; /* Injects precise spacing between panels */
    min-height: calc(100vh - 120px); /* Stretches dashboard vertically to fill viewport screen */
}

/* Base Stylings for Both Left and Right Master Panels */
.panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    display: flex;
    flex-direction: column; /* Stacks header, content, and footer controls vertically */
    overflow: hidden; /* Prevents internal content from bleeding outside rounding */
}

/* Header Sections inside Panels */
.panel-header {
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .panel-header h2 {
        font-size: 1.1rem;
        font-family: monospace; /* Gives a system console workstation aesthetic */
        color: var(--text-primary);
        letter-spacing: 0.05em;
    }

/* --- Left Panel: Terminal Chat Viewport Elements --- */

.chat-panel {
    height: 100%;
}

.chat-log-container {
    flex: 1; /* Forces the log block to absorb all available empty center space */
    padding: 1.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    overflow-y: auto; /* Adds automated scrollbars when log length overflows text boxes */
}

.system-message {
    color: var(--accent); /* Highlights terminal core statuses in your signature Teal */
    background-color: rgba(2, 195, 154, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    border-left: 3px solid var(--accent);
}

/* Lower Prompt Entry Bar Input Controls */
.chat-input-bar {
    padding: 1.25rem;
    background-color: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 0.75rem;
}

    .chat-input-bar input {
        flex: 1;
        background-color: var(--bg-primary);
        border: 1px solid var(--border-subtle);
        padding: 0.75rem 1rem;
        border-radius: 4px;
        color: var(--text-primary);
        font-size: 0.9rem;
    }

    .chat-input-bar button {
        background-color: rgba(23, 32, 48, 0.8);
        color: var(--text-secondary);
        border: 1px solid var(--border-subtle);
        padding: 0.75rem 1.5rem;
        border-radius: 4px;
        font-weight: 600;
        cursor: not-allowed; /* Shows user controls are temporarily safely locked down */
    }

/* Status Indicator Dot System */
.status-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

    .status-indicator-dot.online {
        background-color: var(--accent);
        box-shadow: 0 0 8px var(--accent);
    }

/* --- Right Panel: IoT Topology Elements --- */

.iot-grid-container {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Automated fluid card wrapping */
    gap: 1.25rem;
    overflow-y: auto;
}

/* Hardware Display Cards */
.iot-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    padding: 1.25rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.device-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.device-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

    .device-status.status-on {
        background-color: rgba(2, 195, 154, 0.1);
        color: var(--accent);
    }

    .device-status.status-off {
        background-color: rgba(255, 255, 255, 0.05);
        color: var(--text-secondary);
    }

.iot-card h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.iot-card .telemetry {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: monospace;
}

/* ==========================================================================
   📱 RESPONSIVE DESIGN BREAKPOINTS (Screens 768px and smaller)
   ========================================================================== */
@media screen and (max-width: 768px) {

    /* --- Global Navigation Mobile Stacking --- */
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

        nav ul {
            flex-wrap: wrap;
            justify-content: center;
            gap: 1rem;
        }

            nav ul li a {
                font-size: 0.85rem;
            }

    /* --- Timeline Page Mobile Tweaks --- */
    .timeline-container h1 {
        font-size: 2rem;
    }

    .timeline-container {
        margin: 2rem auto;
    }

    .timeline-axis {
        padding-left: 1.25rem;
        gap: 1.75rem;
    }

    .timeline-card {
        padding: 1.25rem;
    }

        .timeline-card::before {
            left: calc(-1.25rem - 7px);
        }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* --- Workspace Dashboard Mobile Overrides --- */
    .workspace-wrapper {
        grid-template-columns: 1fr; /* Collapses side-by-side into a single stack */
        margin: 1rem auto;
        padding: 0 1rem;
        gap: 1.5rem;
        min-height: auto;
    }

    .chat-panel {
        height: 450px; /* Gives the terminal a solid fixed view height on phones */
    }

    .iot-panel {
        max-height: 500px; /* Limits the hardware container height */
    }

    .iot-grid-container {
        grid-template-columns: 1fr; /* Drops device cards into a clean single stream */
        padding: 1rem;
        gap: 1rem;
    }
}

.badge-progress {
    background-color: rgba(2, 195, 154, 0.1);
    color: var(--accent);
    border: 1px solid var(--accent);
}

/* 🟢 ADD THIS NEW MOBILE RULE HERE: */
.badge-complete {
    background-color: rgba(0, 168, 150, 0.1);
    color: #00a896;
    border: 1px solid #00a896;
}
