/* Dennis Pipeline Dashboard — clean, functional, dark theme */

:root {
    --bg: #0d0e10;
    --surface: #1a1d21;
    --border: #2a2e34;
    --text: #d8dde0;
    --text-secondary: #5a686c;
    --accent: #b0c4c8;
    --amber: #c4a04e;
    --red: #c44e4e;
    --green: #4ec47a;
    --blue: #4e7ac4;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.brand {
    font-weight: 700;
    font-size: 16px;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 24px;
    font-size: 14px;
    transition: color 150ms;
}

.nav-links a:hover { color: var(--text); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

h1 { font-size: 24px; margin-bottom: 24px; font-weight: 700; }
h2 { font-size: 18px; margin: 32px 0 16px; font-weight: 600; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-top: 4px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.05em;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

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

.table a:hover { text-decoration: underline; }

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

.badge-active, .badge-running { background: var(--green); color: #000; }
.badge-stalled, .badge-paused, .badge-flagged { background: var(--amber); color: #000; }
.badge-closed_lost, .badge-stopped, .badge-failed { background: var(--red); color: #fff; }
.badge-closed_won, .badge-passed { background: var(--green); color: #000; }
.badge-initial_contact, .badge-qualification { background: var(--blue); color: #fff; }
.badge-submitted, .badge-pending, .badge-on_hold { background: var(--text-secondary); color: #fff; }

.row-stalled td { color: var(--amber); }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.list {
    list-style: none;
    padding: 0;
}

.list li {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.empty {
    color: var(--text-secondary);
    font-style: italic;
    padding: 24px 0;
}

.search-box {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 16px;
    margin-bottom: 24px;
}

.search-box:focus {
    outline: none;
    border-color: var(--accent);
}

.message {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.message-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.message-text {
    font-size: 14px;
}

.message-inbound { border-left: 3px solid var(--blue); }
.message-outbound { border-left: 3px solid var(--green); }
