:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-2: #242836;
    --border: #2e3345;
    --text: #e1e4ed;
    --text-dim: #8b90a0;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
    --blue: #3b82f6;
    --radius: 8px;
}

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
}

.sidebar-brand {
    padding: 0 20px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.sidebar-brand h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.sidebar-brand small {
    color: var(--text-dim);
    font-size: 12px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-dim);
    font-size: 14px;
    transition: all 0.15s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    color: var(--text);
    background: var(--surface-2);
}

.sidebar nav a.active {
    border-right: 3px solid var(--accent);
}

.main {
    flex: 1;
    margin-left: 220px;
    padding: 32px 40px;
    max-width: 1400px;
}

/* Page header */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-dim);
    font-size: 14px;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.card-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
}

.card-sub {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* Progress bar */
.progress-bar {
    height: 8px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s;
}

.progress-fill.green { background: var(--green); }
.progress-fill.accent { background: var(--accent); }
.progress-fill.yellow { background: var(--yellow); }

/* Tables */
.table-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 32px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    text-align: left;
    padding: 12px 16px;
    background: var(--surface-2);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    cursor: pointer;
}

td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tr:hover td { background: var(--surface-2); }

/* Stage dots */
.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.dot.done { background: var(--green); border-color: var(--green); }
.dot.missing { background: transparent; }

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-complete { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-in_progress, .badge-in-progress { background: rgba(234,179,8,0.15); color: var(--yellow); }
.badge-planned { background: rgba(139,144,160,0.15); color: var(--text-dim); }
.badge-running { background: rgba(59,130,246,0.15); color: var(--blue); }
.badge-failed { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-pending { background: rgba(139,144,160,0.15); color: var(--text-dim); }
.badge-completed { background: rgba(34,197,94,0.15); color: var(--green); }

/* Vendor color swatch */
.swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Vertical cards */
.vertical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.vertical-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.vertical-card h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.vertical-card .tagline {
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 16px;
}

.ring-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.progress-ring {
    width: 56px;
    height: 56px;
}

.progress-ring circle {
    fill: none;
    stroke-width: 6;
}

.progress-ring .bg { stroke: var(--surface-2); }
.progress-ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 0.4s; }

/* Roadmap timeline */
.timeline {
    position: relative;
    padding-left: 40px;
    margin-bottom: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.timeline-dot {
    position: absolute;
    left: -33px;
    top: 18px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg);
}

.timeline-dot.complete { background: var(--green); border-color: var(--green); }
.timeline-dot.in_progress, .timeline-dot.in-progress { background: var(--yellow); border-color: var(--yellow); }

.timeline-item h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.timeline-item .phase-num {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-item p {
    color: var(--text-dim);
    font-size: 13px;
}

.timeline-item .evidence {
    font-size: 12px;
    color: var(--green);
    margin-top: 8px;
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.feature-card h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.feature-card .desc {
    color: var(--text-dim);
    font-size: 13px;
}

/* Velocity chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 160px;
    padding: 0 8px;
    margin-bottom: 8px;
}

.bar-chart .bar {
    flex: 1;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    position: relative;
    transition: height 0.3s;
}

.bar-chart .bar:hover { opacity: 0.8; }

.bar-chart .bar .tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 5;
}

.bar-chart .bar:hover .tooltip { display: block; }

.bar-labels {
    display: flex;
    gap: 6px;
    padding: 0 8px;
}

.bar-labels span {
    flex: 1;
    text-align: center;
    font-size: 10px;
    color: var(--text-dim);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--border); }

.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Textarea */
textarea {
    width: 100%;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Search / filter */
.controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.controls input,
.controls select {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 13px;
}

.controls input:focus,
.controls select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Stars */
.stars { color: var(--yellow); letter-spacing: 2px; }

/* Callout */
.callout {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--yellow);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 14px;
}

/* Section */
.section {
    margin-bottom: 32px;
}

.section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Vendor detail */
.stage-list {
    list-style: none;
    margin-bottom: 24px;
}

.stage-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.check { color: var(--green); }
.cross { color: var(--text-dim); }

/* Research block */
.research-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.research-block h3 {
    font-size: 15px;
    margin-bottom: 8px;
    color: var(--accent);
}

.research-block p {
    font-size: 14px;
    color: var(--text-dim);
    white-space: pre-wrap;
}

/* Activity feed */
.activity-feed {
    list-style: none;
}

.activity-feed li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-feed .time {
    color: var(--text-dim);
    font-size: 11px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0; padding: 16px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .vertical-grid { grid-template-columns: 1fr; }
}
