:root {
    /* PALETTE OPTI-VIBE (Imported from opti.css principles) */
    --bg-color: #131132;
    /* Deep Navy */
    --sidebar-bg: #0c0b21;
    /* Darker Navy */
    --panel-bg: rgba(19, 17, 50, 0.6);
    /* Navy Glass */

    --text-primary: #FDFBF7;
    /* Cream */
    --text-secondary: #94a3b8;
    /* Slate 400 - readable on dark */
    --text-tertiary: #64748b;

    --accent-color: #0C39C8;
    /* Opti Blue */
    --accent-hover: #1e4bd1;
    --accent-glow: rgba(12, 57, 200, 0.3);

    --highlight-color: #E99E3C;
    /* Opti Yellow (Accents only) */

    --success-color: #10b981;
    --warning-color: #E99E3C;
    /* Yellow is warning/highlight */
    --error-color: #ef4444;

    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 16px;

    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* --- GLOBAL RESET & SCROLL --- */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-y: hidden;
    /* Main scroll handled by content */
    margin: 0;
    padding: 0;
}

/* --- DESKTOP COMPACT ZOOM --- */
/* User reported "too small". Zoom removed. */

/* --- LAYOUT GRID --- */
.dashboard-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    /* Compact Sidebar */
    height: 100vh;
    /* Fix horizontal scrollbar */
}

/* --- SIDEBAR --- */

/* --- SIDEBAR --- */
.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    color: white;
}

.logo img {
    height: 32px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.nav-item.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: inline-block;
    text-align: center;
}

/* --- MAIN CONTENT --- */
/* --- MAIN CONTENT --- */
.main-content {
    display: grid;
    grid-template-rows: auto 1fr auto;
    /* Header, Kanban, Console */
    height: 100vh;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at top right, rgba(12, 57, 200, 0.15), transparent 40%);
}

.dashboard-split {
    display: grid;
    grid-template-rows: 1fr auto;
    /* Kanban takes space, console at bottom */
    gap: 1rem;
    overflow: hidden;
    /* Contain scroll within children */
    padding-bottom: 0.5rem;
}

/* --- HEADER --- */
header {
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Pipeline Viz */
.pipeline-viz {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    border: 1px solid var(--glass-border);
}

.pipeline-step {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s;
}

.pipeline-step.active {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

.pipeline-arrow {
    color: var(--text-tertiary);
    opacity: 0.3;
}

/* POST-IT Widget */
.post-it {
    background: var(--highlight-color);
    color: var(--bg-color);
    /* Dark text on Yellow */
    padding: 0.75rem 1rem;
    border-radius: 2px;
    /* Square-ish */
    border-bottom-right-radius: 12px;
    /* Peel effect */
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    max-width: 200px;
    transform: rotate(2deg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite;
}

.post-it-title {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.65rem;
    opacity: 0.7;
    margin-bottom: 2px;
    display: block;
}

/* --- KANBAN BOARD --- */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0 2rem 1rem 2rem;
    overflow-y: auto;
    /* Custom Scrollbar for container */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

.kanban-column {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    /* Min height for drop zone */
}

.column-header {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px 12px 0 0;
}

.column-title {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.column-count {
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
    font-weight: bold;
}

.card-list {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

/* --- JOB CARDS --- */
.job-card {
    background: var(--sidebar-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s;
    cursor: grab;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color);
}

.job-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
    line-height: 1.3;
}

.card-company {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.score-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--accent-color);
    background: rgba(12, 57, 200, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-tags {
    display: flex;
    gap: 0.4rem;
}

.tag {
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- TERMINAL --- */
.terminal-section {
    padding: 0 2rem 1.5rem 2rem;
    height: 25vh;
    /* Fixed height for log area */
}

.terminal-window {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-content {
    flex: 1;
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.4;
    overflow-y: auto;
}

.log-entry {
    margin-bottom: 2px;
}

.log-time {
    color: var(--text-tertiary);
    margin-right: 6px;
}

.log-info {
    color: #93c5fd;
}

.log-success {
    color: var(--success-color);
}

.log-error {
    color: var(--error-color);
}

.log-system {
    color: var(--warning-color);
    font-weight: bold;
}

/* Buttons */
.btn-icon {
    padding: 0.3rem;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.2s;
    cursor: pointer;
    background: transparent;
    border: none;
}

.btn-icon:hover {
    background: var(--accent-color);
    color: white;
}

/* Primary Button */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent-color);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Modal */
.glass-panel {
    background: var(--sidebar-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Animations */
@keyframes float {
    0% {
        transform: rotate(2deg) translateY(0px);
    }

    50% {
        transform: rotate(2deg) translateY(-5px);
    }

    100% {
        transform: rotate(2deg) translateY(0px);
    }
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(233, 158, 60, 0.7);
        border-color: var(--highlight-color);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(233, 158, 60, 0);
        border-color: var(--highlight-color);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(233, 158, 60, 0);
    }
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}