/* ─── Design tokens — based on mockup design system ────────────── */
:root {
    /* Backgrounds */
    --bg:            #07090d;
    --panel:         #0e1218;
    --panel-2:       #0f131a;
    --sidebar-bg:    rgba(10,13,18,.90);
    /* Borders */
    --border:        rgba(255,255,255,.08);
    --border-sub:    rgba(255,255,255,.06);
    --border-hover:  rgba(255,255,255,.14);
    /* Text */
    --text:          #ffffff;
    --text-68:       rgba(255,255,255,.68);
    --text-50:       rgba(255,255,255,.50);
    --text-45:       rgba(255,255,255,.45);
    --text-32:       rgba(255,255,255,.32);
    /* Brand — emerald green */
    --brand:         #14b883;
    --brand-hover:   #19c68f;
    --brand-soft:    rgba(16,185,129,.10);
    --brand-ring:    rgba(52,211,153,.15);
    --brand-300:     rgb(52,211,153);   /* emerald-300 */
    --brand-200:     rgb(110,231,183);  /* emerald-200 */
    /* Status badge colours (per mockup) */
    --status-lead-bg:    rgba(14,165,233,.10);
    --status-lead-text:  rgb(147,210,255);
    --status-lead-border: rgba(14,165,233,.20);
    --status-contact-bg:  rgba(245,158,11,.10);
    --status-contact-text: rgb(252,211,77);
    --status-contact-border: rgba(245,158,11,.20);
    --status-demo-bg:    rgba(16,185,129,.10);
    --status-demo-text:  rgb(110,231,183);
    --status-demo-border: rgba(16,185,129,.20);
    --status-offer-bg:   rgba(139,92,246,.10);
    --status-offer-text: rgb(196,181,253);
    --status-offer-border: rgba(139,92,246,.20);
    --status-client-bg:  rgba(20,184,166,.10);
    --status-client-text: rgb(94,234,212);
    --status-client-border: rgba(20,184,166,.20);
    /* Priority */
    --prio-high-bg:   rgba(244,63,94,.10);
    --prio-high-text: rgb(252,165,165);
    --prio-med-bg:    rgba(245,158,11,.10);
    --prio-med-text:  rgb(252,211,77);
    --prio-low-bg:    rgba(113,113,122,.10);
    --prio-low-text:  rgb(212,212,216);
    /* Temperature */
    --temp-hot-bg:   rgba(244,63,94,.10);
    --temp-hot-text: rgb(252,165,165);
    --temp-warm-bg:  rgba(245,158,11,.10);
    --temp-warm-text: rgb(252,211,77);
    --temp-cold-bg:  rgba(14,165,233,.10);
    --temp-cold-text: rgb(147,210,255);
    /* Generic alert colours */
    --green:         #4ade80;
    --green-soft:    rgba(74,222,128,.12);
    --red:           #f87171;
    --red-soft:      rgba(248,113,113,.12);
    --yellow:        #facc15;
    --yellow-soft:   rgba(250,204,21,.10);
    --blue:          #60a5fa;
    --blue-soft:     rgba(96,165,250,.10);
    /* Radii */
    --radius-sm:     12px;
    --radius:        16px;
    --radius-lg:     20px;
    --radius-xl:     26px;
    /* Shadow */
    --shadow-surface: 0 10px 40px rgba(0,0,0,.18);
    --transition:    .15s cubic-bezier(.4,0,.2,1);
}

/* ─── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ─── App shell & sidebar ───────────────────────────────────────── */
.app-shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--border-sub);
    padding: 20px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 20px;
    margin-bottom: 8px;
}
.brand-mark {
    width: 44px; height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, #18d59f 0%, #11b784 50%, #0d7c63 100%);
    box-shadow: 0 0 24px rgba(24,213,159,.22);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-mark-inner {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.90);
    border-bottom-color: transparent;
    border-left-color: transparent;
    transform: rotate(45deg);
}
.brand-title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.brand-subtitle { color: var(--text-32); font-size: 11px; margin-top: 4px; }

/* Nav */
.nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-32);
    padding: 14px 16px 4px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-lg);
    color: var(--text-68);
    font-size: 15px;
    font-weight: 500;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    position: relative;
    cursor: pointer;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
    text-decoration: none;
}
.nav-link .nav-icon {
    width: 16px; height: 16px;
    flex-shrink: 0;
}
.nav-link:hover {
    background: rgba(255,255,255,.05);
    color: var(--text);
}
.nav-link.active {
    background: linear-gradient(180deg, rgba(22,163,74,.18), rgba(16,185,129,.10));
    box-shadow: inset 0 0 0 1px rgba(52,211,153,.15);
    color: var(--text);
}

/* Sprint focus sidebar card */
.sidebar-focus {
    margin-top: 28px;
    border-radius: 24px;
    border: 1px solid rgba(52,211,153,.10);
    background: linear-gradient(180deg, rgba(16,185,129,.10), rgba(255,255,255,.02));
    padding: 16px;
}
.sidebar-focus-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--brand-300);
    margin-bottom: 8px;
    font-weight: 500;
}
.sidebar-focus-text {
    font-size: 13.5px;
    line-height: 1.65;
    color: rgba(255,255,255,.72);
}

/* User card at bottom */
.sidebar-footer {
    padding-top: 20px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    padding: 12px;
}
.sidebar-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.10);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}
.sidebar-user-name { font-size: 14px; font-weight: 500; }
.sidebar-user-name-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-role { font-size: 12px; color: var(--text-45); margin-top: 2px; }

/* Week filter button */
.btn-week-filter {
    gap: 6px;
    height: 44px;
    padding: 0 14px;
    font-size: 13.5px;
}

/* ─── Content area ──────────────────────────────────────────────── */
.content { padding: 24px 28px; min-width: 0; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-32);
    font-size: 13.5px;
}
.breadcrumbs .bc-sep { color: var(--text-32); }
.breadcrumbs .bc-current { color: var(--text-50); }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

/* Search */
.search-wrap {
    position: relative;
    width: 360px;
}
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-32);
    pointer-events: none;
}
.search {
    width: 100%;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    height: 44px;
    padding: 0 14px 0 38px;
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand-ring);
}
.search::placeholder { color: var(--text-32); }

/* ─── Button system ─────────────────────────────────────────────── */
.btn, .btn-primary, .btn-secondary, .btn-ghost, .ghost-btn, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 18px;
    height: 44px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--transition), opacity var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
/* Primary – green */
.btn, .btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.btn:hover, .btn-primary:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
}
/* Secondary / Ghost – dark outlined */
.btn-secondary, .ghost-btn, .btn-ghost {
    background: var(--panel-2);
    color: var(--text-68);
    border-color: var(--border);
}
.btn-secondary:hover, .ghost-btn:hover, .btn-ghost:hover {
    background: rgba(255,255,255,.05);
    color: var(--text);
}
/* Icon-only button */
.btn-icon {
    width: 44px; height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: var(--panel-2);
    color: var(--text-50);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}
.btn-icon:hover { color: var(--text); }
/* Danger */
.btn-danger {
    background: var(--red-soft);
    color: var(--red);
    border-color: rgba(248,113,113,.20);
}
.btn-danger:hover { background: rgba(248,113,113,.18); }

/* ─── Page / section header ─────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
}
.page-header h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.15;
}
.page-header p { margin: 8px 0 0; color: var(--text-45); font-size: 14px; }
.page-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ─── Surface (card) ────────────────────────────────────────────── */
.surface, .card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-surface);
    overflow: hidden;
}
.card + .card,
.surface + .surface { margin-top: 16px; }

.card-header, .surface-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-sub);
    gap: 12px;
}
.card-header > div:first-child,
.surface-header > div:first-child { min-width: 0; }
.card-header h2, .surface-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.card-header p, .surface-header p { margin: 4px 0 0; color: var(--text-45); font-size: 13px; }

/* ─── Metric cards ──────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-surface);
    padding: 20px;
}
.stat-card.accent {
    background: radial-gradient(circle at top left, rgba(16,185,129,.14), transparent 42%), var(--panel);
}
.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.stat-label { color: var(--text-45); font-size: 14px; }
.stat-icon { color: var(--brand-300); }
.stat-value { font-size: 38px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.stat-delta { margin-top: 4px; font-size: 13px; color: var(--brand-300); }
.stat-value.small { font-size: 20px; }

/* ─── Tables ────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
    padding: 14px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-sub);
    font-size: 14px;
}
.table th {
    color: var(--text-32);
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .18em;
}
.table tbody tr { transition: background var(--transition); cursor: pointer; }
.table tbody tr:hover { background: rgba(255,255,255,.03); }
.table tbody tr:last-child td { border-bottom: none; }
.table .cell-primary { font-weight: 500; color: var(--text); }
.table .cell-sub { margin-top: 4px; font-size: 12.5px; color: var(--text-45); }
.table .cell-secondary { font-size: 14px; color: var(--text-68); }
.table a { color: var(--text-68); }
.table a:hover { color: var(--text); }

/* ─── Status / badge system ─────────────────────────────────────── */
.status, .badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
/* Company status */
.status-new-lead  { background: var(--status-lead-bg);    color: var(--status-lead-text);    border-color: var(--status-lead-border); }
.status-contact   { background: var(--status-contact-bg); color: var(--status-contact-text); border-color: var(--status-contact-border); }
.status-demo      { background: var(--status-demo-bg);    color: var(--status-demo-text);    border-color: var(--status-demo-border); }
.status-offer     { background: var(--status-offer-bg);   color: var(--status-offer-text);   border-color: var(--status-offer-border); }
.status-client    { background: var(--status-client-bg);  color: var(--status-client-text);  border-color: var(--status-client-border); }
/* Priority */
.priority-high    { background: var(--prio-high-bg);  color: var(--prio-high-text);  border-color: rgba(244,63,94,.20); }
.priority-medium  { background: var(--prio-med-bg);   color: var(--prio-med-text);   border-color: rgba(245,158,11,.20); }
.priority-low     { background: var(--prio-low-bg);   color: var(--prio-low-text);   border-color: rgba(113,113,122,.20); }
/* Temperature */
.temp-hot  { background: var(--temp-hot-bg);  color: var(--temp-hot-text);  border-color: rgba(244,63,94,.20); }
.temp-warm { background: var(--temp-warm-bg); color: var(--temp-warm-text); border-color: rgba(245,158,11,.20); }
.temp-cold { background: var(--temp-cold-bg); color: var(--temp-cold-text); border-color: rgba(14,165,233,.20); }
/* Generic (keep existing status names for backward compat) */
.status-sent     { background: var(--green-soft);  color: var(--green);   border-color: rgba(74,222,128,.20); }
.status-failed   { background: var(--red-soft);    color: var(--red);     border-color: rgba(248,113,113,.20); }
.status-pending  { background: var(--yellow-soft); color: var(--yellow);  border-color: rgba(250,204,21,.20); }
.status-prepared { background: var(--blue-soft);   color: var(--blue);    border-color: rgba(96,165,250,.20); }
.status-done     { background: var(--green-soft);  color: var(--green);   border-color: rgba(74,222,128,.20); }
.status-executing{ background: var(--yellow-soft); color: var(--yellow);  border-color: rgba(250,204,21,.20); }
.status-draft    { background: rgba(255,255,255,.05); color: var(--text-45); border-color: var(--border); }

/* Product pills */
.product-pill {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(16,185,129,.10);
    background: rgba(16,185,129,.08);
    font-size: 12px;
    font-weight: 500;
    color: var(--brand-200);
}

/* ─── Alerts ────────────────────────────────────────────────────── */
.alert-error   { padding: 13px 18px; background: var(--red-soft);    border: 1px solid rgba(248,113,113,.25); border-radius: var(--radius); color: var(--red);    margin-bottom: 16px; font-size: 14px; }
.alert-success { padding: 13px 18px; background: var(--green-soft);  border: 1px solid rgba(74,222,128,.22);  border-radius: var(--radius); color: var(--green);  margin-bottom: 16px; font-size: 14px; }
.alert-warning { padding: 13px 18px; background: var(--yellow-soft); border: 1px solid rgba(250,204,21,.25);  border-radius: var(--radius); color: var(--yellow); margin-bottom: 16px; font-size: 14px; }

/* ─── Form controls ─────────────────────────────────────────────── */
.form-group  { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label  {
    display: block;
    color: var(--text-45);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-textarea { height: auto; min-height: 100px; padding: 12px 14px; resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand-ring);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-32); }
.form-error { color: var(--red); font-size: 12px; margin-top: 4px; }

/* ─── Tabs ──────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid var(--border-sub);
    margin-bottom: 20px;
    font-size: 13.5px;
    color: var(--text-45);
}
.tab {
    padding-bottom: 12px;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    font-size: inherit;
    transition: color var(--transition);
}
.tab:hover { color: rgba(255,255,255,.75); }
.tab.active {
    border-bottom: 2px solid var(--brand);
    color: var(--text);
    padding-bottom: 10px;
}

/* ─── Details grid & items ──────────────────────────────────────── */
.details-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) 380px; gap: 18px; }
.details-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px 20px 20px; }
.detail-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.03);
}
.detail-item.full { grid-column: 1 / -1; }
.detail-label {
    color: var(--text-32);
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .18em;
}
.detail-value { font-size: 14px; line-height: 1.65; color: var(--text); }

/* ─── Contact cards ─────────────────────────────────────────────── */
.contact-list { padding: 16px; display: grid; gap: 10px; }
.contact-card {
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    transition: background var(--transition);
}
.contact-card:hover { background: rgba(255,255,255,.045); }
.contact-name { font-weight: 500; font-size: 14px; }
.contact-role { color: var(--text-45); margin-top: 4px; font-size: 13px; }
.contact-meta { color: var(--text-45); margin-top: 4px; font-size: 13px; }
.contact-temp { margin-top: 8px; }

/* ─── Quick info panel ──────────────────────────────────────────── */
.quick-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    font-size: 13.5px;
}
.quick-info-label { color: var(--text-50); }
.quick-info-value { color: var(--text); font-weight: 500; }

/* ─── Next action card ──────────────────────────────────────────── */
.next-action-card {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(16,185,129,.12);
    background: rgba(16,185,129,.08);
    padding: 16px;
}
.next-action-title { font-size: 17px; font-weight: 500; }
.next-action-time { margin-top: 8px; font-size: 13px; color: var(--brand-200); }

/* ─── Empty state ───────────────────────────────────────────────── */
.empty-state {
    padding: 32px 24px;
    color: var(--text-45);
    font-size: 14px;
    text-align: center;
}

/* ─── Confirm ack ───────────────────────────────────────────────── */
.confirm-ack { margin-bottom: 16px; }
.confirm-ack-label { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-50); font-size: 14px; }
.confirm-ack-checkbox { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; accent-color: var(--brand); }

/* ─── Timeline ──────────────────────────────────────────────────── */
.timeline { padding: 20px 24px; }
.timeline-item {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
}
.timeline-item-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(255,255,255,.02);
    padding: 14px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition);
}
.timeline-item-inner:hover { background: rgba(255,255,255,.04); }
.timeline-activity-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-lg);
    background: rgba(16,185,129,.10);
    color: var(--brand-300);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.timeline-title { font-weight: 500; font-size: 14px; }
.timeline-desc { font-size: 13px; color: rgba(255,255,255,.62); margin-top: 6px; line-height: 1.55; }
.timeline-date { font-size: 13px; color: var(--text-45); flex-shrink: 0; }

/* ─── Pipeline ──────────────────────────────────────────────────── */
.pipeline-filters { padding: 16px 20px; margin-bottom: 18px; }
.pipeline-filter-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-label { color: var(--text-32); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.filter-select {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    height: 40px;
    padding: 0 12px;
    min-width: 190px;
    cursor: pointer;
    transition: border-color var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand-ring); }
.filter-reset { height: 40px; display: inline-flex; align-items: center; padding: 0 14px; }
.pipeline-groups { display: grid; gap: 18px; }
.pipeline-group { overflow: hidden; }
.pipeline-group-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 24px; border-bottom: 1px solid var(--border-sub);
}
.pipeline-group-title { display: flex; align-items: center; gap: 10px; }
.pipeline-brand-tag {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(16,185,129,.10);
    color: var(--brand-300);
    border: 1px solid rgba(52,211,153,.15);
    font-size: 11.5px;
    font-weight: 600;
}
.pipeline-product-name { font-size: 16px; font-weight: 600; }
.pipeline-count { color: var(--text-45); font-size: 13px; }

/* ─── Tabs filter bar (companies page) ─────────────────────────── */
.filter-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}
.filter-tab {
    border-radius: var(--radius-lg);
    padding: 7px 16px;
    font-size: 13.5px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-50);
    transition: background var(--transition), color var(--transition);
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active { background: rgba(255,255,255,.08); color: var(--text); }

/* ─── Import preview ────────────────────────────────────────────── */
.stats-row { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--border-sub); }
.stat-item { flex: 1; min-width: 120px; padding: 18px 22px; border-right: 1px solid var(--border-sub); }
.stat-item:last-child { border-right: none; }
.stat-item-error   { background: rgba(248,113,113,.05); }
.stat-item-warning { background: rgba(250,204,21,.05); }
.stat-value-error   { color: var(--red); }
.stat-value-warning { color: var(--yellow); }
.import-row-error   { background: rgba(248,113,113,.05); }
.import-row-warning { background: rgba(250,204,21,.04); }
.import-cell-missing { background: rgba(250,204,21,.07); }
.import-missing-hint { color: var(--text-45); font-style: italic; }
.import-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.import-badge-create  { background: var(--green-soft);   color: var(--green);   border-color: rgba(74,222,128,.20); }
.import-badge-reuse   { background: var(--blue-soft);    color: var(--blue);    border-color: rgba(96,165,250,.20); }
.import-badge-skip    { background: rgba(255,255,255,.05); color: var(--text-45); border-color: var(--border); }
.import-badge-ok      { background: var(--green-soft);   color: var(--green);   border-color: rgba(74,222,128,.20); }
.import-badge-error   { background: var(--red-soft);     color: var(--red);     border-color: rgba(248,113,113,.20); }
.import-badge-warning { background: var(--yellow-soft);  color: var(--yellow);  border-color: rgba(250,204,21,.20); cursor: default; }
.import-badge-update  { background: rgba(16,185,129,.10); color: var(--brand-300); border-color: rgba(52,211,153,.15); }

/* ─── Topbar user chip ──────────────────────────────────────────── */
.topbar-user {
    color: var(--text-68);
    font-size: 13px;
    padding: 6px 12px;
    background: var(--panel-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1300px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .details-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .search-wrap { width: 220px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .content { padding: 20px; }
}
@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
}
