/* SLG AIP 1.3 Prospecting App — Stylesheet */

/* === CSS Variables === */
:root {
    --sidebar-w: 240px;
    --sidebar-w-collapsed: 56px;
    --sidebar-bg: #1A1D23;
    --sidebar-hover: #2A2D35;
    --sidebar-active: #333740;
    --sidebar-border: rgba(255,255,255,0.08);
    --brand-green: #7E9A3A;
    --brand-green-dark: #6b8430;
    --brand-green-light: #e8f0d8;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-muted: #888;
    --bg-page: #f0f2f5;
    --bg-card: #fff;
    --border-color: #e5e7eb;
    --transition-speed: 0.2s;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body { font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg-page); color: var(--text-primary); line-height: 1.5; }
a { color: var(--brand-green); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ============================================
   SIDEBAR — SAE-style collapsible
   ============================================ */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: width var(--transition-speed) ease;
    overflow: hidden;
}

/* --- Sidebar Brand --- */
.sidebar-brand {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 60px;
}
.brand-logo {
    flex-shrink: 0;
    transition: opacity var(--transition-speed) ease;
}
.brand-logo-full {
    height: 28px;
    width: auto;
}
.brand-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: none;
}
.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: opacity var(--transition-speed) ease;
}
.brand-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.brand-sub {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Sidebar Nav Scroll --- */
.sidebar-nav-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
}
.sidebar-nav-scroll::-webkit-scrollbar { width: 3px; }
.sidebar-nav-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* --- Nav Sections --- */
.nav-section {
    padding: 0.25rem 0.5rem;
}
.nav-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    padding: 0.5rem 0.65rem 0.35rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition-speed) ease;
}

/* --- Nav Links --- */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    color: rgba(255,255,255,0.65);
    font-size: 0.85rem;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}
.nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
    text-decoration: none;
}
.nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
}
.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 3px;
    background: var(--brand-green);
    border-radius: 0 2px 2px 0;
}
.nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* --- Sidebar Footer --- */
.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding: 0;
    margin-top: auto;
}

/* User info */
.sidebar-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}
.sidebar-user-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.badge-admin { color: var(--brand-green); }
.badge-management { color: #4F8BFF; }
.badge-marketing { color: #E9A23B; }
.badge-bdm { color: rgba(255,255,255,0.5); }

.sidebar-logout {
    color: rgba(255,255,255,0.4);
    padding: 0.35rem;
    border-radius: 4px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.sidebar-logout:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    text-decoration: none;
}

/* Dorn brand footer */
.sidebar-brand-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--sidebar-border);
}
.footer-logo {
    height: 16px;
    width: auto;
    opacity: 0.4;
    transition: opacity var(--transition-speed) ease;
}
.footer-version {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.25);
    transition: opacity var(--transition-speed) ease;
}

/* Toggle button */
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.sidebar-toggle:hover {
    color: rgba(255,255,255,0.7);
    background: var(--sidebar-hover);
}
.toggle-icon-collapse { display: block; flex-shrink: 0; }
.toggle-icon-expand { display: none; flex-shrink: 0; }
.toggle-label {
    transition: opacity var(--transition-speed) ease;
    white-space: nowrap;
}

/* ============================================
   SIDEBAR COLLAPSED STATE
   ============================================ */
.sidebar-collapsed .sidebar {
    width: var(--sidebar-w-collapsed);
}
.sidebar-collapsed .content {
    margin-left: var(--sidebar-w-collapsed);
}

/* Brand: swap logos */
.sidebar-collapsed .brand-logo-full { display: none; }
.sidebar-collapsed .brand-logo-icon { display: block; }
.sidebar-collapsed .brand-text { opacity: 0; width: 0; overflow: hidden; }

/* Nav labels hidden */
.sidebar-collapsed .nav-label { opacity: 0; height: 0; padding: 0; margin: 0; overflow: hidden; }

/* Nav links: icon-only */
.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 0.6rem;
}
.sidebar-collapsed .nav-text {
    display: none;
}
.sidebar-collapsed .nav-link.active::before {
    top: 0.25rem;
    bottom: 0.25rem;
}

/* User info hidden */
.sidebar-collapsed .sidebar-user-info { display: none; }
.sidebar-collapsed .sidebar-user { justify-content: center; }

/* Footer hidden */
.sidebar-collapsed .sidebar-brand-footer { display: none; }

/* Toggle icon swap */
.sidebar-collapsed .toggle-icon-collapse { display: none; }
.sidebar-collapsed .toggle-icon-expand { display: block; }
.sidebar-collapsed .toggle-label { opacity: 0; width: 0; overflow: hidden; }

/* --- Tooltips (collapsed sidebar) --- */
.sidebar-collapsed .nav-link[data-tooltip] {
    position: relative;
}
.sidebar-collapsed .nav-link[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(var(--sidebar-w-collapsed) - 8px);
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.sidebar-collapsed .nav-link[data-tooltip]:hover::after {
    opacity: 1;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 1.5rem 2rem;
    min-height: 100vh;
    transition: margin-left var(--transition-speed) ease;
}

/* === Flash Messages === */
.flash-container { margin-bottom: 1rem; }
.flash {
    padding: 0.75rem 1rem; border-radius: 6px; font-size: 0.85rem;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.5rem;
}
.flash-success { background: #e8f5e9; color: #2e7d32; border-left: 3px solid var(--brand-green); }
.flash-error { background: #fce4ec; color: #c62828; border-left: 3px solid #c62828; }
.flash-info { background: #e3f2fd; color: #1565c0; border-left: 3px solid #4F8BFF; }
.flash-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: inherit; }

/* === Page Header === */
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); }
.page-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.25rem; }
.breadcrumb { font-size: 0.75rem; color: #aaa; margin-bottom: 0.5rem; }
.breadcrumb a { color: #999; transition: color 0.1s ease; }
.breadcrumb a:hover { color: var(--brand-green); text-decoration: none; }

/* === Contact Header === */
.contact-header { display: flex; justify-content: space-between; align-items: flex-start; }
.contact-header h1 { line-height: 1.2; display: flex; align-items: center; gap: 0.4rem; }
.linkedin-icon {
    display: inline-flex; align-items: center; opacity: 0.85;
    transition: opacity 0.15s; vertical-align: middle;
}
.linkedin-icon:hover { opacity: 1; }
.linkedin-icon svg { display: block; }
.header-actions { display: flex; gap: 0.4rem; align-items: center; flex-shrink: 0; }

/* === KPI Row === */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.kpi-row-5 { grid-template-columns: repeat(5, 1fr); }
.kpi-card {
    background: var(--bg-card); border-radius: 8px; padding: 1.25rem;
    text-align: center; border: 1px solid var(--border-color);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.kpi-value { font-size: 2rem; font-weight: 800; color: var(--brand-green); }
.kpi-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* === Cards === */
.card {
    background: var(--bg-card); border-radius: 8px; border: 1px solid var(--border-color);
    overflow: hidden; transition: box-shadow 0.15s ease;
}
.card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.card-header {
    padding: 0.85rem 1rem; background: #fafafa; border-bottom: 1px solid var(--border-color);
    font-weight: 700; font-size: 0.9rem; color: #333;
}
.card-body { padding: 1rem; }
.card-wide { grid-column: 1 / -1; }

/* === Dashboard Grid === */
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

/* === Detail Grid === */
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

/* === Data Table === */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th {
    text-align: left; padding: 0.6rem 0.75rem; background: #f5f5f5;
    font-weight: 600; color: #777; border-bottom: 2px solid var(--border-color);
    white-space: nowrap; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.3px;
}
.data-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid #f0f0f0; }
.data-table tbody tr { transition: background 0.1s ease; }
.data-table tbody tr:hover { background: #fafafa; }

/* Sortable column headers */
.data-table th.sortable-th {
    cursor: pointer; user-select: none; position: relative; padding-right: 1.4rem;
}
.data-table th.sortable-th:hover { color: #333; background: #ebebeb; }
.data-table th.sortable-th::after {
    content: '\2195'; position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%);
    font-size: 0.7rem; color: #bbb; transition: color 0.15s;
}
.data-table th.sortable-th.sort-asc::after { content: '\25B2'; color: var(--dorn-green, #7E9A3A); }
.data-table th.sortable-th.sort-desc::after { content: '\25BC'; color: var(--dorn-green, #7E9A3A); }

.table-responsive { overflow-x: auto; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-small { font-size: 0.8rem; }
.text-muted { color: var(--text-muted); }
.text-error { color: #c62828; }

/* === Sortable Table Headers === */
.sortable-th { padding: 0 !important; }
.sort-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 0.75rem;
    color: #777;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.sort-link:hover {
    color: var(--brand-green);
    background: #eef3e6;
    text-decoration: none;
}
.sort-link.sort-active {
    color: var(--brand-green);
}
.sort-indicator {
    font-size: 0.55rem;
    line-height: 1;
}
.sort-indicator.sort-inactive {
    opacity: 0;
    transition: opacity 0.15s ease;
}
.sort-link:hover .sort-indicator.sort-inactive {
    opacity: 0.35;
}

/* === Prospect Table === */
.prospect-table td { vertical-align: middle; }
.prospect-table tbody tr:hover { background: #f5f8ff; }
.prospect-table .company-link { transition: color 0.1s ease; }
.company-link { color: #333; font-weight: 600; }
.company-link:hover { color: var(--brand-green); }

/* === Detail Fields === */
.detail-fields { display: flex; flex-direction: column; gap: 0.5rem; }
.detail-field { display: flex; gap: 0.5rem; }
.detail-field label { min-width: 110px; font-weight: 600; color: var(--text-muted); font-size: 0.7rem; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.3px; }
.detail-field span { font-size: 0.85rem; color: #333; }

/* === Status Badges === */
.status-badge {
    display: inline-block; padding: 0.15rem 0.5rem; border-radius: 10px;
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
    white-space: nowrap;
}
.status-new { background: #e3f2fd; color: #1565c0; }
.status-researching { background: #fff3e0; color: #e65100; }
.status-enriched { background: #e8f5e9; color: #2e7d32; }
.status-dossier_ready { background: #e0f7ea; color: #1b6b3a; font-weight: 700; }
.status-outreach_active { background: #e8eaf6; color: #283593; }
.status-responded { background: #f3e5f5; color: #6a1b9a; }
.status-meeting_set { background: #e8eaf6; color: #283593; font-weight: 700; }
.status-opportunity { background: #fff8e1; color: #f57f17; }
.status-won { background: #c8e6c9; color: #1b5e20; font-weight: 700; }
.status-lost { background: #ffcdd2; color: #b71c1c; }
.status-disqualified { background: #f5f5f5; color: #757575; }

.territory-badge {
    display: inline-block; padding: 0.15rem 0.4rem; border-radius: 4px;
    font-size: 0.7rem; font-weight: 700; background: var(--sidebar-bg); color: #fff;
}
.segment-badge {
    display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px;
    font-size: 0.75rem; background: #f0f0f0; color: #333;
}
.badge {
    display: inline-block; padding: 0.1rem 0.5rem; border-radius: 10px;
    font-size: 0.75rem; background: #e5e7eb; color: #555; margin-left: 0.5rem;
}
.check-mark { color: var(--brand-green); font-weight: 700; }

/* === Filter Bar === */
.filter-bar { margin-bottom: 1rem; }
.filter-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.filter-select {
    padding: 0.5rem 0.75rem; border: 1px solid #ddd; border-radius: 6px;
    font-size: 0.85rem; background: var(--bg-card); color: #333;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-input {
    padding: 0.5rem 0.75rem; border: 1px solid #ddd; border-radius: 6px;
    font-size: 0.85rem; min-width: 220px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-input:focus, .filter-select:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(126,154,58,0.12);
}
.filter-input-sm { min-width: 180px; }

/* === Multi-Select Dropdown === */
.multiselect { position: relative; display: inline-block; }
.multiselect-trigger {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 0.75rem; border: 1px solid #ddd; border-radius: 6px;
    font-size: 0.85rem; background: var(--bg-card); color: #333;
    cursor: pointer; white-space: nowrap; min-width: 160px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.multiselect-trigger:hover { border-color: #bbb; }
.multiselect.open .multiselect-trigger {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(126,154,58,0.12);
}
.multiselect-label { flex: 1; text-align: left; }
.multiselect-arrow { font-size: 0.7rem; color: #999; transition: transform 0.15s; }
.multiselect.open .multiselect-arrow { transform: rotate(180deg); }
.multiselect-dropdown {
    display: none; position: absolute; top: calc(100% + 4px); left: 0;
    z-index: 100; background: #fff; border: 1px solid #ddd; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); min-width: 300px; max-width: 380px;
}
.multiselect.open .multiselect-dropdown { display: block; }
.multiselect-search-wrap { padding: 0.5rem; border-bottom: 1px solid #eee; }
.multiselect-search {
    width: 100%; padding: 0.4rem 0.6rem; border: 1px solid #ddd; border-radius: 5px;
    font-size: 0.85rem; outline: none;
}
.multiselect-search:focus { border-color: var(--brand-green); }
.multiselect-items {
    max-height: 260px; overflow-y: auto; padding: 0.25rem 0;
}
.multiselect-item {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.75rem;
    cursor: pointer; font-size: 0.83rem; color: #333; transition: background 0.1s;
}
.multiselect-item:hover { background: #f5f5f5; }
.multiselect-item input[type="checkbox"] {
    width: 15px; height: 15px; accent-color: var(--brand-green);
    cursor: pointer; flex-shrink: 0;
}
.multiselect-item-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multiselect-item-count {
    font-size: 0.75rem; color: #999; background: #f0f0f0; padding: 0.1rem 0.4rem;
    border-radius: 8px; flex-shrink: 0;
}
.multiselect-item.hidden { display: none; }
.multiselect-footer {
    display: flex; justify-content: space-between; padding: 0.5rem 0.75rem;
    border-top: 1px solid #eee;
}

/* === Buttons === */
.btn {
    display: inline-block; padding: 0.5rem 1rem; border: none; border-radius: 6px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.15s ease;
    text-decoration: none; line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand-green); color: #fff; }
.btn-primary:hover { background: var(--brand-green-dark); }
.btn-primary:active { transform: scale(0.97); }
.btn-accent { background: var(--brand-green); color: #fff; }
.btn-accent:hover { background: var(--brand-green-dark); }
.btn-accent:active { transform: scale(0.97); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid #ddd; }
.btn-ghost:hover { background: #f5f5f5; color: #333; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.75rem; }
.btn-full { width: 100%; }

/* === Action Bar (legacy) === */
.action-bar {
    display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
    padding: 0.75rem 1rem; background: var(--bg-card); border-radius: 8px;
    border: 1px solid var(--border-color); margin-bottom: 1rem;
}
.action-bar .btn + .btn { margin-left: 0; }
.action-bar .btn-accent { box-shadow: 0 1px 3px rgba(126,154,58,0.3); }
.action-bar .btn-primary { box-shadow: 0 1px 3px rgba(126,154,58,0.3); }

/* === Progress Timeline === */
.progress-timeline {
    display: flex; align-items: flex-start; padding: 1.25rem 1.5rem 1rem;
    background: var(--bg-card); border-radius: 8px;
    border: 1px solid var(--border-color); margin-bottom: 1rem;
    gap: 0;
}
.timeline-step {
    display: flex; flex-direction: column; align-items: center;
    flex: 0 0 auto; position: relative;
}
.timeline-circle {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; flex-shrink: 0;
    transition: all 0.2s ease;
}
.timeline-step.completed .timeline-circle {
    background: var(--brand-green); color: #fff;
}
.timeline-step.active .timeline-circle {
    background: #fff; color: var(--brand-green);
    border: 2px solid var(--brand-green);
    box-shadow: 0 0 0 4px rgba(126,154,58,0.15);
}
.timeline-step.pending .timeline-circle {
    background: #f0f0f0; color: #bbb;
    border: 2px solid #ddd;
}
.timeline-content {
    text-align: center; margin-top: 0.5rem; min-width: 100px;
}
.timeline-label {
    font-size: 0.82rem; font-weight: 600; color: #333;
    margin-bottom: 0.25rem;
}
.timeline-step.pending .timeline-label { color: #bbb; }
.timeline-meta {
    font-size: 0.72rem; color: #999; margin-bottom: 0.25rem;
}
.timeline-redo {
    font-size: 0.72rem; color: var(--brand-green); background: none;
    border: none; cursor: pointer; padding: 0; text-decoration: underline;
    opacity: 0.7; transition: opacity 0.15s;
}
.timeline-redo:hover { opacity: 1; }
.timeline-connector {
    flex: 1; height: 3px; background: #e0e0e0;
    min-width: 40px; margin-top: 17px;
}
.timeline-connector.done { background: var(--brand-green); }

/* Email draft warning (no email address) */
.btn-email-warn {
    background: #E9A23B;
    border-color: #d4912e;
}
.btn-email-warn:hover {
    background: #d4912e;
}
.email-warn-icon {
    font-size: 0.85rem;
    margin-left: 0.15rem;
}

/* === Research Dossier Grid === */
.dossier-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem;
}
.dossier-panel {
    border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color);
    transition: box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dossier-panel:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.1); }
.dossier-panel-header {
    padding: 0.75rem 1rem; font-weight: 700; font-size: 0.9rem;
    color: #fff; text-align: center;
}
.dossier-contact .dossier-panel-header { background: #445566; }
.dossier-company .dossier-panel-header { background: #2E6B8A; }
.dossier-industry .dossier-panel-header { background: #5A7040; }
.dossier-panel-body {
    padding: 1rem; background: var(--bg-card); font-size: 0.85rem; line-height: 1.6;
    min-height: 200px;
}
.dossier-panel-body ul { margin: 0.5rem 0; padding-left: 1.25rem; list-style-type: disc; }
.dossier-panel-body li { margin-bottom: 0.4rem; line-height: 1.55; color: #444; }
.dossier-panel-body strong { color: #333; }

/* === Email Preview === */
.email-preview { background: #fafafa; border-radius: 6px; padding: 1rem; border: 1px solid var(--border-color); }
.email-field { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.85rem; }
.email-field label { min-width: 60px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.3px; }
.email-field:last-of-type { margin-bottom: 0; }
.email-body-preview {
    margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color);
    font-size: 0.85rem; line-height: 1.7;
}
.email-body-preview p { margin-bottom: 0.75rem; }
.email-body-preview p:last-child { margin-bottom: 0; }
.enrichment-meta { font-size: 0.7rem; color: #999; margin-top: 0.75rem; }

/* === Employment History === */
.employment-item { padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; }
.employment-item:last-child { border-bottom: none; }
.employment-item.current { border-left: 3px solid var(--brand-green); padding-left: 0.75rem; }
.employment-title { font-weight: 600; font-size: 0.85rem; }
.employment-company { font-size: 0.8rem; color: var(--text-secondary); }
.employment-dates { font-size: 0.75rem; }

/* === Other Contacts (legacy list) === */
.other-contact-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.5rem 0.5rem; margin: 0 -0.5rem; border-radius: 4px;
    transition: background 0.1s ease;
}
.other-contact-item:hover { background: #f5f8ff; }
.other-contact-item + .other-contact-item { border-top: 1px solid #f0f0f0; }

/* === 9-Box Org Grid === */
.org-grid-9box {
    display: grid;
    grid-template-columns: 120px 1fr 1fr 1fr;
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}
.org-grid-corner {
    background: #fff;
    padding: 0.5rem;
    display: flex; align-items: flex-end; justify-content: center;
}
.org-axis-label {
    font-size: 0.68rem; color: #999; text-transform: uppercase;
    letter-spacing: 0.05em; font-weight: 600;
}
.org-grid-col-header {
    background: #fafafa; padding: 0.6rem 0.5rem; text-align: center;
}
.org-col-title {
    font-size: 0.78rem; font-weight: 700; color: #333;
    text-transform: uppercase; letter-spacing: 0.03em;
}
.org-col-desc {
    font-size: 0.65rem; color: #999; margin-top: 0.15rem;
}
.org-grid-row-header {
    background: #fafafa; padding: 0.5rem 0.5rem; display: flex;
    flex-direction: column; justify-content: center;
    border-left: 3px solid var(--brand-green);
}
.org-row-title {
    font-size: 0.75rem; font-weight: 700; color: #333;
    text-transform: uppercase;
}
.org-row-desc {
    font-size: 0.62rem; color: #999; margin-top: 0.15rem;
}
.org-grid-cell {
    background: #fff; padding: 0.5rem; min-height: 70px;
    max-height: 200px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 0.35rem;
    align-items: center; justify-content: center;
}
.org-grid-cell.has-contacts {
    align-items: stretch; justify-content: flex-start;
}
.org-cell-empty { color: #ddd; font-size: 0.85rem; }
.org-contact-card {
    padding: 0.35rem 0.5rem; background: #f8f9fa; border-radius: 4px;
    border-left: 3px solid var(--brand-green);
}
.org-contact-name {
    font-size: 0.78rem; font-weight: 600;
    display: flex; align-items: center; gap: 0.3rem;
}
.org-contact-name a { color: #333; text-decoration: none; }
.org-contact-name a:hover { color: var(--brand-green); }
.org-linkedin { display: inline-flex; opacity: 0.7; }
.org-linkedin:hover { opacity: 1; }
.org-contact-title {
    font-size: 0.68rem; color: #777; margin-top: 0.1rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 200px;
}
.org-cell-overflow {
    font-size: 0.7rem; color: var(--brand-green); text-align: center;
    padding: 0.15rem; font-weight: 600;
}
.org-cell-expand {
    cursor: pointer; border-radius: 3px; transition: background 0.15s;
}
.org-cell-expand:hover {
    background: var(--brand-green-light); text-decoration: underline;
}
.org-grid-footer {
    text-align: center; padding: 0.5rem 0 0.25rem;
}

/* === View Toggle Buttons === */
.view-toggle-btn {
    padding: 0.2rem 0.6rem; font-size: 0.72rem; border: 1px solid #ddd;
    border-radius: 4px; background: #fff; color: #666;
    cursor: pointer; transition: all 0.15s;
}
.view-toggle-btn.active {
    background: var(--brand-green); color: #fff; border-color: var(--brand-green);
}
.view-toggle-btn:hover:not(.active) {
    background: #f0f0f0;
}

/* === Departmental Headcount Bars === */
.dept-headcount-grid {
    display: flex; flex-direction: column; gap: 0.3rem;
}
.dept-bar-row {
    display: flex; align-items: center; gap: 0.5rem;
}
.dept-bar-label {
    font-size: 0.7rem; color: #666; width: 130px; text-align: right;
    flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dept-bar-track {
    flex: 1; height: 14px; background: #f0f0f0; border-radius: 3px;
    overflow: hidden;
}
.dept-bar-fill {
    height: 100%; background: var(--brand-green); border-radius: 3px;
    min-width: 4px; transition: width 0.3s ease;
}
.dept-bar-value {
    font-size: 0.7rem; color: #333; font-weight: 600; width: 50px;
    text-align: right; flex-shrink: 0;
}

/* === Sub-Organization Grid === */
.sub-org-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}
.sub-org-card {
    padding: 0.5rem 0.6rem; background: #f8f9fa; border-radius: 4px;
    border-left: 3px solid var(--brand-green);
}
.sub-org-name {
    font-size: 0.8rem; font-weight: 600; color: #333;
}
.sub-org-card a {
    font-size: 0.7rem; color: var(--brand-green);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block;
}

/* === Notes === */
.notes-textarea {
    width: 100%; min-height: 80px; padding: 0.75rem; border: 1px solid #ddd;
    border-radius: 6px; font-size: 0.85rem; font-family: inherit; resize: vertical;
}
.notes-textarea:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(126,154,58,0.12);
}

/* === Activity Feed === */
.activity-feed { max-height: 300px; overflow-y: auto; }
.activity-feed::-webkit-scrollbar { width: 4px; }
.activity-feed::-webkit-scrollbar-track { background: transparent; }
.activity-feed::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.activity-feed::-webkit-scrollbar-thumb:hover { background: #bbb; }
.activity-item {
    padding: 0.6rem 0.5rem; margin: 0 -0.5rem; border-radius: 4px;
    transition: background 0.1s ease;
}
.activity-item:hover { background: #fafafa; }
.activity-action { font-weight: 600; font-size: 0.8rem; color: var(--sidebar-bg); }
.activity-detail { font-size: 0.8rem; color: var(--text-secondary); }
.activity-meta { font-size: 0.7rem; color: #999; margin-top: 0.15rem; }

/* === Pagination === */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 1rem; margin-top: 1rem; padding: 0.75rem 0;
}
.page-info { font-size: 0.85rem; font-weight: 600; color: #555; }
.pagination .btn-ghost { border-color: var(--border-color); }
.pagination .btn-ghost:hover { background: #f5f5f5; border-color: #ccc; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-container {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1A1D23 0%, #1e2a1e 50%, #2a3a20 100%);
}
.login-card {
    background: var(--bg-card); border-radius: 12px; padding: 2.5rem;
    width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-header { text-align: center; margin-bottom: 2rem; }
.login-logo {
    width: 180px;
    height: auto;
    margin: 0 auto 1rem;
    display: block;
}
.login-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--sidebar-bg); }
.login-header p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
.login-form .form-group { margin-bottom: 1.25rem; }
.login-form label { display: block; font-size: 0.8rem; font-weight: 600; color: #555; margin-bottom: 0.35rem; }
.login-form input {
    width: 100%; padding: 0.7rem 0.85rem; border: 1px solid #ddd; border-radius: 6px;
    font-size: 0.9rem;
}
.login-form input:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(126,154,58,0.12);
}
.login-section { margin-bottom: 0.5rem; }
.login-hint { text-align: center; font-size: 0.75rem; color: #999; margin-top: 0.75rem; }

/* Google Sign-In Button */
.google-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    width: 100%; padding: 0.75rem 1rem;
    background: var(--bg-card); border: 2px solid var(--border-color); border-radius: 6px;
    font-size: 0.95rem; font-weight: 600; color: #333;
    cursor: pointer; transition: all 0.15s;
    text-decoration: none;
}
.google-btn:hover {
    border-color: #4285F4; background: #f8faff;
    text-decoration: none; color: #333;
    box-shadow: 0 2px 8px rgba(66,133,244,0.15);
}
.google-icon { flex-shrink: 0; }

/* Login Divider */
.login-divider {
    display: flex; align-items: center; gap: 1rem;
    margin: 1.5rem 0; color: #ccc; font-size: 0.8rem;
}
.login-divider::before, .login-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border-color);
}
.login-divider span { color: #999; font-weight: 500; }

.login-footer { text-align: center; margin-top: 1.5rem; font-size: 0.75rem; color: #aaa; }
.login-footer strong { color: var(--brand-green); }

/* === Intel Dots (Prospect Table) === */
.intel-dot { font-size: 0.6rem; margin: 0 1px; }
.intel-dossier { color: var(--brand-green); }
.intel-email { color: #E9A23B; }
.intel-enriched { color: #4F8BFF; }
.row-dossier-ready { background: #fafff5; }
.row-dossier-ready:hover { background: #f0f8e8 !important; }

/* === Loading State === */
.btn[disabled], .btn.loading { opacity: 0.6; pointer-events: none; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .dossier-grid { grid-template-columns: 1fr; }
    .kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar { display: none; }
    .content { margin-left: 0 !important; padding: 1rem; }
    .detail-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .kpi-row { grid-template-columns: 1fr; }
    .filter-form { flex-direction: column; }
    .filter-input { min-width: 100%; }
    .guide-grid-3 { grid-template-columns: 1fr; }
    .guide-grid-2 { grid-template-columns: 1fr; }
    .guide-stat-row { flex-direction: column; gap: 0.5rem; }
    .guide-dossier-layers { grid-template-columns: 1fr; }
}

/* ============================================
   PROGRAM GUIDE PAGE
   ============================================ */

/* --- At-a-Glance Process Bar --- */
.guide-glance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.15rem 1.5rem;
    margin-bottom: 1.25rem;
}
.guide-glance-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
    flex: 1;
    min-width: 0;
}
.guide-glance-step:hover {
    background: #f5f8f2;
    text-decoration: none;
}
.guide-glance-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}
.guide-glance-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}
.guide-glance-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
    white-space: nowrap;
}
.guide-glance-page {
    font-size: 0.6rem;
    color: var(--brand-green);
    font-weight: 600;
    margin-top: 0.25rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.guide-glance-arrow {
    color: #ccc;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 0.15rem;
}

@media (max-width: 768px) {
    .guide-glance { flex-direction: column; gap: 0.25rem; padding: 1rem; }
    .guide-glance-step { flex-direction: row; gap: 0.75rem; text-align: left; padding: 0.4rem 0.75rem; width: 100%; }
    .guide-glance-num { width: 26px; height: 26px; font-size: 0.75rem; margin-bottom: 0; flex-shrink: 0; }
    .guide-glance-arrow { transform: rotate(90deg); padding: 0; }
    .guide-glance-desc { display: none; }
}

/* --- Guide Sections --- */
.guide-section {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}
.guide-section:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.guide-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #fafafa;
    border-bottom: 1px solid var(--border-color);
}
.guide-section-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}
.guide-section-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}
.guide-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    flex-shrink: 0;
}
.guide-section-body {
    padding: 1.5rem;
}

/* --- Stat Row (6% vs 43%) --- */
.guide-stat-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}
.guide-stat {
    text-align: center;
}
.guide-stat-value {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.35rem;
}
.guide-stat-bad { color: #c62828; }
.guide-stat-good { color: var(--brand-green); }
.guide-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 180px;
}
.guide-stat-vs {
    font-size: 1rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Callout Box --- */
.guide-callout {
    background: var(--brand-green-light);
    border-left: 4px solid var(--brand-green);
    padding: 1rem 1.25rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
}

/* --- Key Point --- */
.guide-key-point {
    margin-bottom: 1.25rem;
}
.guide-key-point h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.guide-key-point p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}
.guide-key-point ul {
    padding-left: 1.25rem;
    margin: 0.5rem 0;
}
.guide-key-point li {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.4rem;
    line-height: 1.55;
}

/* --- Grid Layouts --- */
.guide-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.guide-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* --- Source Cards (6 lead sources) --- */
.guide-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}
.guide-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.guide-card-header {
    background: var(--sidebar-bg);
    color: #fff;
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}
.guide-card-body {
    padding: 0.85rem;
}
.guide-card-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.65rem;
}
.guide-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--brand-green);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

/* --- Guide Hero Section --- */
.guide-hero {
    background: linear-gradient(135deg, #f5f8f2 0%, #e8f0d8 100%);
    border: 1px solid #d4e4b8;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.25rem;
    text-align: center;
}
.guide-hero-inner h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-green-dark);
    margin-bottom: 0.5rem;
}
.guide-hero-inner p {
    font-size: 0.85rem;
    color: #444;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- App Step Callout --- */
.guide-app-step {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    background: #f0f5ff;
    border-radius: 8px;
    border: 1px solid #d6e3ff;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #333;
}
.guide-app-step-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #4F8BFF;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.guide-btn-label {
    display: inline-block;
    background: var(--brand-green);
    color: #fff;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* --- Primary App Step (bigger, green-tinted) --- */
.guide-app-step-primary {
    background: #f5f8f2;
    border: 1px solid #d4e4b8;
    margin-top: 0;
    margin-bottom: 1.25rem;
}
.guide-app-step-primary .guide-app-step-icon {
    background: var(--brand-green);
}
.guide-action-list {
    margin: 0.5rem 0 0 1.25rem;
    list-style-type: decimal;
}
.guide-action-list li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
}
.guide-action-list ul {
    margin: 0.25rem 0 0.25rem 1.25rem;
    list-style-type: disc;
}
.guide-action-list ul li {
    margin-bottom: 0.25rem;
}

/* --- Dossier Layers (3-panel) --- */
.guide-dossier-layers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
}
.guide-dossier-layer {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.guide-dossier-layer-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}
.guide-layer-human { background: #445566; }
.guide-layer-company { background: #2E6B8A; }
.guide-layer-space { background: #5A7040; }
.guide-dossier-layer-body {
    padding: 1rem;
    font-size: 0.85rem;
    line-height: 1.6;
}
.guide-dossier-layer-body ul {
    padding-left: 1.1rem;
    margin: 0.5rem 0;
}
.guide-dossier-layer-body li {
    margin-bottom: 0.35rem;
    color: #444;
}
.guide-layer-source {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--brand-green);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.5rem;
}
.guide-layer-tip {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid #f0f0f0;
    font-style: italic;
}
.guide-layer-tip strong {
    font-style: normal;
    color: var(--brand-green);
}

/* --- Email Structure --- */
.guide-email-structure {
    margin-bottom: 1.5rem;
}
.guide-email-part {
    display: flex;
    gap: 1rem;
    padding: 1.15rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.guide-email-part:last-child {
    border-bottom: none;
}
.guide-email-part-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.guide-email-part-content {
    flex: 1;
    min-width: 0;
}
.guide-email-part-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}
.guide-email-part-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 0.65rem;
}

/* --- Email Examples --- */
.guide-example {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.guide-example-bad, .guide-example-good {
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    line-height: 1.55;
}
.guide-example-bad {
    background: #fef2f2;
    border-left: 3px solid #c62828;
    color: #555;
}
.guide-example-good {
    background: #f0faf0;
    border-left: 3px solid var(--brand-green);
    color: #333;
}
.guide-example-label {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-right: 0.5rem;
    vertical-align: middle;
}
.guide-example-bad .guide-example-label {
    background: #c62828;
    color: #fff;
}
.guide-example-good .guide-example-label {
    background: var(--brand-green);
    color: #fff;
}

/* --- Pitfall Cards --- */
.guide-pitfalls {
    margin-top: 1.5rem;
}
.guide-pitfalls h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.guide-pitfall-card {
    background: #fef8f5;
    border: 1px solid #fde6d8;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}
.guide-pitfall-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.guide-pitfall-card strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}
.guide-pitfall-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Outreach Sequence --- */
.guide-sequence {
    margin-top: 0.75rem;
}
.guide-sequence-phase {
    margin-bottom: 1.25rem;
}
.guide-sequence-phase-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.guide-sequence-phase-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}
.guide-phase-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.guide-phase-linkedin { background: #0A66C2; }
.guide-phase-multi { background: var(--brand-green); }

.guide-sequence-steps {
    border-left: 3px solid #e5e7eb;
    padding-left: 0;
    margin-left: 0.5rem;
}
.guide-sequence-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0 0.45rem 1rem;
    position: relative;
    font-size: 0.85rem;
}
.guide-sequence-step::before {
    content: '';
    position: absolute;
    left: -6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ccc;
}
.guide-phase-linkedin + .guide-sequence-steps .guide-sequence-step::before {
    border-color: #0A66C2;
}
.guide-phase-multi + .guide-sequence-steps .guide-sequence-step::before {
    border-color: var(--brand-green);
}
.guide-step-day {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 48px;
    text-transform: uppercase;
}
.guide-step-action {
    flex: 1;
    color: #444;
}
.guide-step-channel {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    background: #f0f0f0;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    white-space: nowrap;
}

/* --- 12-Week Timeline --- */
.guide-timeline {
    position: relative;
    padding-left: 2rem;
}
.guide-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: linear-gradient(to bottom, var(--brand-green), var(--brand-green-light));
    border-radius: 2px;
}
.guide-timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}
.guide-timeline-item:last-child {
    padding-bottom: 0;
}
.guide-timeline-marker {
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-green);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--brand-green);
    z-index: 1;
}
.guide-timeline-content {
    padding-left: 0.5rem;
}
.guide-timeline-period {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--brand-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}
.guide-timeline-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.guide-timeline-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* --- Quick Reference Section --- */
.guide-section-ref .guide-step-number {
    background: var(--sidebar-bg);
}
.guide-ref-card {
    background: #fafafa;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}
.guide-ref-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brand-green);
}
.guide-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.guide-status-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.guide-status-item .status-badge {
    min-width: 100px;
    text-align: center;
}

/* --- Checklist --- */
.guide-checklist {
    list-style: none;
    padding: 0;
}
.guide-checklist li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.5rem;
    font-size: 0.8rem;
    color: #444;
    line-height: 1.5;
    border-bottom: 1px solid #f0f0f0;
}
.guide-checklist li:last-child {
    border-bottom: none;
}
.guide-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 14px;
    height: 14px;
    border: 2px solid var(--brand-green);
    border-radius: 3px;
}

/* --- Guide Responsive (larger screens) --- */
@media (max-width: 1000px) {
    .guide-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .guide-dossier-layers { grid-template-columns: 1fr; }
}


/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 29, 35, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}
.loading-overlay.visible { opacity: 1; }

.loading-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem 3rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--brand-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.25rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-message {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.loading-subtext {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}


/* ============================================
   ENRICHMENT RESULTS MODAL
   ============================================ */
.enrich-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 29, 35, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    overflow-y: auto;
    padding: 2rem;
}
.enrich-modal-overlay.visible { opacity: 1; }

.enrich-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.enrich-modal-overlay.visible .enrich-modal {
    transform: translateY(0);
}

.enrich-modal-header {
    background: var(--brand-green);
    color: #fff;
    padding: 1.5rem 1.75rem;
    text-align: center;
}
.enrich-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}
.enrich-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}
.enrich-modal-summary {
    font-size: 0.8rem;
    opacity: 0.85;
    margin: 0;
}

.enrich-stats {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}
.enrich-stat {
    flex: 1;
    text-align: center;
    padding: 1rem 0.5rem;
    border-right: 1px solid var(--border-color);
}
.enrich-stat:last-child { border-right: none; }
.enrich-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-green);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.enrich-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.enrich-modal-body {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.enrich-section {
    border-bottom: 1px solid var(--border-color);
}
.enrich-section:last-child { border-bottom: none; }

.enrich-section-header {
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: #fafafa;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.enrich-section-count {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.enrich-field-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.25rem;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.85rem;
}
.enrich-field-row:last-child { border-bottom: none; }

.enrich-field-status {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    flex-shrink: 0;
    min-width: 52px;
    text-align: center;
}
.enrich-new {
    background: #e8f5e9;
    color: #2e7d32;
}
.enrich-updated {
    background: #e3f2fd;
    color: #1565c0;
}

.enrich-field-label {
    min-width: 120px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.enrich-field-value {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
    flex: 1;
}

.enrich-empty {
    padding: 1rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
}

.enrich-modal-footer {
    padding: 1rem 1.25rem;
    text-align: center;
    background: #fafafa;
    border-top: 1px solid var(--border-color);
}
.enrich-modal-footer .btn {
    min-width: 120px;
    padding: 0.6rem 1.5rem;
}


/* ============================================
   EMAIL VERSION BROWSER
   ============================================ */
.email-version-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #fafafa;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
}

.email-version-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.email-version-nav .btn-version-arrow {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0;
    transition: all 0.15s ease;
    line-height: 1;
}
.email-version-nav .btn-version-arrow:hover:not([disabled]) {
    border-color: var(--brand-green);
    color: var(--brand-green);
    background: #eef3e6;
}
.email-version-nav .btn-version-arrow[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.email-version-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
}

.email-version-divider {
    width: 1px;
    height: 18px;
    background: var(--border-color);
}

.btn-version-history {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s ease;
}
.btn-version-history:hover {
    color: var(--brand-green);
    background: #eef3e6;
}
.btn-version-history.active {
    color: var(--brand-green);
    font-weight: 600;
}

.email-version-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}
.email-version-list.expanded {
    max-height: 300px;
    overflow-y: auto;
}

.email-version-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.15s ease;
}
.email-version-item:last-child { border-bottom: none; }
.email-version-item:hover { background: #f5f5f5; }
.email-version-item.active {
    background: #eef3e6;
    border-left: 3px solid var(--brand-green);
    padding-left: calc(1rem - 3px);
}

.email-version-num {
    font-weight: 700;
    color: var(--brand-green);
    min-width: 24px;
}
.email-version-date {
    color: var(--text-muted);
    font-size: 0.75rem;
    min-width: 90px;
}
.email-version-subject {
    flex: 1;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================
   SEQUENCE ENGINE — Library, Detail, Tasks
   ============================================ */

/* --- Filter Pills --- */
.filter-pills {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.pill {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.pill:hover {
    border-color: var(--brand-green);
    color: var(--brand-green);
}
.pill.active {
    background: var(--brand-green);
    color: #fff;
    border-color: var(--brand-green);
}

/* --- Sequence Cards Grid --- */
.sequence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.sequence-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sequence-card:hover {
    border-color: var(--brand-green);
    box-shadow: 0 2px 8px rgba(126,154,58,0.12);
    text-decoration: none;
}
.sequence-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sequence-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.sequence-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    flex: 1;
}
.sequence-card-stats {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}
.seq-stat {
    flex: 1;
    text-align: center;
}
.seq-stat-value {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}
.seq-stat-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Source Type Badges --- */
.source-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.source-cold_icp { background: #e8edf4; color: #3b5998; }
.source-referral { background: #e8f0d8; color: #5a7a1e; }
.source-tradeshow { background: #fef3e0; color: #b8860b; }
.source-lapsed { background: #f0e8f0; color: #8b4789; }
.source-partner { background: #e0f0f0; color: #2e8b8b; }
.source-custom { background: #f0f0f0; color: #666; }

.template-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    background: var(--brand-green-light);
    color: var(--brand-green-dark);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* --- Channel Badges --- */
.channel-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}
.channel-email { background: #e8edf4; color: #3b5998; }
.channel-linkedin { background: #e8f3fc; color: #0A66C2; }
.channel-phone { background: #e8f0d8; color: #5a7a1e; }
.channel-direct_mail { background: #fef3e0; color: #b8860b; }
.channel-event { background: #f0e8f0; color: #8b4789; }

/* --- Channel Summary (Task Queue) --- */
.channel-summary {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.channel-pill {
    padding: 0.3rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* --- Sequence Timeline (Detail Page) --- */
.sequence-timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline-phase-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1rem 0 0.5rem -2rem;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
}
.timeline-phase-header:first-child { margin-top: 0; }
.timeline-phase-header.phase-open { background: #e8f0d8; color: #5a7a1e; }
.timeline-phase-header.phase-educate { background: #e8edf4; color: #3b5998; }
.timeline-phase-header.phase-engage { background: #fef3e0; color: #b8860b; }
.timeline-phase-header.phase-persist { background: #f0e8f0; color: #8b4789; }

.phase-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.phase-open .phase-dot { background: #5a7a1e; }
.phase-educate .phase-dot { background: #3b5998; }
.phase-engage .phase-dot { background: #b8860b; }
.phase-persist .phase-dot { background: #8b4789; }

.phase-dot-sm {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.25rem;
}
.phase-dot-sm.phase-open { background: #5a7a1e; }
.phase-dot-sm.phase-educate { background: #3b5998; }
.phase-dot-sm.phase-engage { background: #b8860b; }
.phase-dot-sm.phase-persist { background: #8b4789; }

.timeline-step {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f5f5f5;
}
.timeline-step:last-child { border-bottom: none; }

.timeline-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.timeline-step-body {
    flex: 1;
    min-width: 0;
}
.timeline-step-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}
.timeline-day {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}
.touch-type {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}
.timeline-subject {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 0.2rem;
}
.timeline-framework {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.2rem;
}
.timeline-notes {
    font-size: 0.75rem;
    color: var(--brand-green-dark);
    background: var(--brand-green-light);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

/* --- Progress Bar (Mini, for enrollments table) --- */
.progress-bar-mini {
    width: 60px;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.35rem;
}
.progress-fill {
    height: 100%;
    background: var(--brand-green);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* --- Enrollment Status Badges --- */
.enrollment-status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}
.enrollment-status.status-active { background: #e8f0d8; color: #5a7a1e; }
.enrollment-status.status-paused { background: #fef3e0; color: #b8860b; }
.enrollment-status.status-completed { background: #f0f0f0; color: #666; }
.enrollment-status.status-removed { background: #fde8e8; color: #c44; }

/* --- Disposition Badges --- */
.disposition-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}
.disp-interested { background: #e8f0d8; color: #5a7a1e; }
.disp-not_now { background: #fef3e0; color: #b8860b; }
.disp-not_interested { background: #fde8e8; color: #c44; }
.disp-wrong_person { background: #f0f0f0; color: #666; }
.disp-no_response { background: #f0f0f0; color: #999; }

/* --- Task Queue --- */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.task-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s ease;
}
.task-item:hover { background: #fafafa; }
.task-item:last-child { border-bottom: none; }
.task-overdue { border-left: 3px solid #e55; padding-left: calc(1rem - 3px); }

.task-left { flex: 1; min-width: 0; }
.task-right { flex-shrink: 0; padding-left: 1rem; }

.task-channel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.overdue-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: #e55;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-contact {
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}
.task-company {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}
.task-sequence-name {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    background: #f0f0f0;
    border-radius: 3px;
    color: var(--text-muted);
}
.task-type {
    font-size: 0.78rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}
.task-framework {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
    max-width: 600px;
}
.task-bdm-note {
    font-size: 0.75rem;
    color: var(--brand-green-dark);
    background: var(--brand-green-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
    max-width: 600px;
}

/* Prep readiness indicators */
.prep-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}
.prep-ready {
    color: #3a8a3a;
    background: #e8f5e8;
}
.prep-needed {
    color: #b86800;
    background: #fff3e0;
}
.task-prep-steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}
.prep-step {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}
.prep-step.prep-missing {
    color: #b86800;
    background: #fff3e0;
}
.prep-step.prep-done {
    color: #3a8a3a;
    background: #e8f5e8;
}

.task-actions {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

/* LinkedIn Button */
.btn-linkedin {
    background: #0A66C2;
    color: #fff;
    border-color: #0A66C2;
}
.btn-linkedin:hover {
    background: #0854a0;
    border-color: #0854a0;
}

/* --- KPI Alert (red highlight for overdue) --- */
.kpi-alert {
    border-color: #e55 !important;
}
.kpi-alert .kpi-value {
    color: #e55;
}
.kpi-alert-warn {
    border-color: #e9a23b !important;
}
.kpi-alert-warn .kpi-value {
    color: #b86800;
}

/* --- Modal Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.modal-card {
    background: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body {
    padding: 1.25rem;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: #fafafa;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}
.form-select, .form-input, .form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.15s ease;
}
.form-select:focus, .form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 2px rgba(126,154,58,0.15);
}
.form-textarea {
    resize: vertical;
    min-height: 60px;
}

/* --- Breadcrumb --- */
.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.breadcrumb a {
    color: var(--text-muted);
}
.breadcrumb a:hover {
    color: var(--brand-green);
}
.breadcrumb-sep {
    margin: 0 0.35rem;
    color: #ccc;
}

/* --- Sequence Description --- */
.sequence-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 700px;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* --- Card header sub text --- */
.card-header-sub {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* --- Actions Cell (compact) --- */
.actions-cell {
    white-space: nowrap;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state svg {
    margin-bottom: 0.75rem;
}
.empty-state p {
    margin-bottom: 1rem;
}

/* --- KPI Row variants --- */
.kpi-row-4 {
    grid-template-columns: repeat(4, 1fr);
}
.kpi-row-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* --- Page Header Row (flex) --- */
.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.page-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

/* ============================================
   PHASE 2 — SEQUENCE BUILDER / EDITOR
   ============================================ */

.sequence-builder { max-width: 960px; }

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.form-row .form-group { flex: 1; min-width: 180px; }
.form-row .form-group-wide { flex: 2; min-width: 280px; }

.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}
.form-group .required { color: #c44; }

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-primary);
    transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 2px rgba(126, 154, 58, 0.15);
}
.form-textarea { resize: vertical; }

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Step Editor */
.step-editor {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: #fafafa;
    overflow: hidden;
}
.step-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #f0f2f5;
    border-bottom: 1px solid var(--border-color);
}
.step-editor-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-green);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
}
.step-editor-controls {
    display: flex;
    gap: 0.25rem;
}
.step-editor-body {
    padding: 0.75rem;
}
.step-editor-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.step-editor-row .form-group-sm {
    flex: 1;
    min-width: 100px;
    margin-bottom: 0.5rem;
}
.step-editor-row .form-group-sm label {
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
}
.step-editor-row .form-group-sm .form-input,
.step-editor-row .form-group-sm .form-select {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
}

.step-add-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
}

.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.2;
}
.btn-danger { color: #c44; }
.btn-danger:hover { background: #fee; }


/* ============================================
   PHASE 2 — WAVE MANAGEMENT
   ============================================ */

.wave-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}
.wave-card {
    display: block;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fafafa;
    transition: border-color 0.15s, box-shadow 0.15s;
    text-decoration: none;
    color: inherit;
}
.wave-card:hover {
    border-color: var(--brand-green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-decoration: none;
}
.wave-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.wave-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}
.wave-card-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.wave-notes-banner {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.wave-actions-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}


/* ============================================
   PHASE 2 — CONTACT PICKER (Wave + Bulk)
   ============================================ */

.contact-picker-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.contact-picker-toolbar .form-input {
    flex: 1;
    min-width: 200px;
}

.contact-picker-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.contact-picker-list .data-table { margin: 0; }
.contact-picker-list .data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8f9fa;
}

.data-table-compact td, .data-table-compact th {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
}


/* ============================================
   PHASE 2 — AI CONTENT PREVIEW (Task Queue)
   ============================================ */

.task-content-preview {
    flex-basis: 100%;
    margin-top: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #dde;
    border-radius: 6px;
    overflow: hidden;
}
.content-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #e8f0d8;
    border-bottom: 1px solid #d0dab8;
    font-size: 0.8rem;
}
.content-preview-body {
    padding: 0.75rem;
    font-size: 0.82rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}
.content-preview-actions {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid #dde;
    text-align: right;
}


/* ============================================
   PHASE 2 — MODAL LARGE VARIANT
   ============================================ */

.modal-lg {
    max-width: 720px;
    width: 95%;
}


/* ============================================
   PHASE 2 — DETAIL GRID (side-by-side cards)
   ============================================ */

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}


/* ============================================
   PHASE 3 — OVERDUE ALERT BANNER
   ============================================ */

.overdue-alert-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #b91c1c;
}
.overdue-alert-banner svg { flex-shrink: 0; color: #dc2626; }

.badge-overdue {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: #fecaca;
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-today {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-interested {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: #e8f0d8;
    color: #5a7a1e;
    font-size: 0.75rem;
    font-weight: 600;
}

.kpi-value-green { color: var(--brand-green); }
.kpi-value-red { color: #dc2626; }
.kpi-card-compact { padding: 0.75rem 0.5rem; }
.kpi-card-compact .kpi-value { font-size: 1.4rem; }
.kpi-card-compact .kpi-label { font-size: 0.7rem; }


/* ============================================
   PHASE 3 — PORTFOLIO VIEW
   ============================================ */

.portfolio-stats-bar {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
}
.portfolio-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.portfolio-stat-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.portfolio-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 1200px) {
    .portfolio-grid { grid-template-columns: 1fr; }
}

.seq-stats-banner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}


/* ============================================
   PHASE 3 — DISPOSITION FEED
   ============================================ */

.disposition-feed {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.disposition-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.disposition-item:last-child { border-bottom: none; }
.disposition-detail { flex: 1; line-height: 1.4; }
.disposition-date { flex-shrink: 0; white-space: nowrap; }

.disposition-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    margin-top: 0.15rem;
}
.disposition-interested { background: #e8f0d8; color: #5a7a1e; }
.disposition-not_interested { background: #fde8e8; color: #c44; }
.disposition-meeting_booked { background: #dbeafe; color: #1e40af; }
.disposition-no_response { background: #f0f0f0; color: #666; }
.disposition-wrong_person { background: #fef3c7; color: #92400e; }
.disposition-do_not_contact { background: #fde8e8; color: #991b1b; }


/* ============================================
   PHASE 3 — TOUCH TIMELINE (Contact Page)
   ============================================ */

.touch-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.touch-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    border-left: 3px solid transparent;
    transition: background 0.1s;
}
.touch-timeline-item:last-child { border-bottom: none; }
.touch-timeline-item:hover { background: #fafbfc; }

/* Touch states */
.touch-done { border-left-color: var(--brand-green); opacity: 0.75; }
.touch-skipped { border-left-color: #ddd; opacity: 0.6; }
.touch-overdue { border-left-color: #dc2626; background: #fffbfb; }
.touch-today { border-left-color: #f59e0b; background: #fffdf5; }
.touch-future { border-left-color: transparent; }

/* Timeline marker */
.touch-timeline-marker {
    flex-shrink: 0;
    width: 28px;
    display: flex;
    justify-content: center;
    padding-top: 0.15rem;
}
.touch-marker-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
}
.touch-marker-done { background: var(--brand-green); color: #fff; }
.touch-marker-skip { background: #e5e5e5; color: #999; }
.touch-marker-overdue { background: #fecaca; color: #b91c1c; }
.touch-marker-pending { background: #f0f0f0; color: #555; }

/* Timeline content */
.touch-timeline-content { flex: 1; min-width: 0; }
.touch-timeline-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.touch-step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}
.touch-timeline-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}
.touch-timeline-subject {
    color: var(--text-secondary);
    margin-top: 0.15rem;
    font-style: italic;
}
.touch-timeline-notes {
    margin-top: 0.1rem;
}
.touch-timeline-actions {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 0.1rem;
}

/* Enrollment card */
.enrollment-card .card-header {
    background: #fafff5;
    border-bottom-color: #d0dab8;
}

/* ============================================================
   GMAIL CONNECT BANNER
   ============================================================ */

.gmail-connect-banner {
    background: linear-gradient(135deg, #f0f7e6 0%, #e8f5d4 100%);
    border: 1px solid #c5d9a5;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
}

.gmail-connect-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #333;
}

.gmail-connect-inner svg {
    color: #7E9A3A;
    flex-shrink: 0;
}

.gmail-connect-inner span {
    flex: 1;
}

.gmail-connect-dismiss {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 0 0.25rem;
}

.gmail-connect-dismiss:hover {
    color: #333;
}

/* ============================================================
   EMAIL TRACKING BADGES
   ============================================================ */

.email-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.email-status-sent {
    background: #e8f4fd;
    color: #1976d2;
}

.email-status-opened {
    background: #e8f5e9;
    color: #388e3c;
}

.email-status-replied {
    background: #fff3e0;
    color: #f57c00;
}

.email-status-draft {
    background: #f5f5f5;
    color: #757575;
}

/* Email tracking timeline */
.email-tracking-timeline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #666;
}

.email-tracking-step {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.email-tracking-step.active {
    color: #7E9A3A;
    font-weight: 600;
}

.email-tracking-arrow {
    color: #ccc;
}

/* Send button group */
.send-btn-group {
    display: inline-flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #7E9A3A;
}

.send-btn-group .btn-send {
    background: #7E9A3A;
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.send-btn-group .btn-send:hover {
    background: #6b8530;
}

.send-btn-group .btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-btn-group .btn-dropdown {
    background: #6b8530;
    color: white;
    border: none;
    border-left: 1px solid rgba(255,255,255,0.3);
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    font-size: 0.65rem;
}

.send-btn-group .btn-dropdown:hover {
    background: #5a7228;
}

/* Dropdown menu */
.send-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 160px;
    z-index: 100;
}

.send-dropdown-menu.show {
    display: block;
}

.send-dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    border: none;
    background: none;
    font-size: 0.8rem;
    cursor: pointer;
    color: #333;
}

.send-dropdown-menu button:hover {
    background: #f5f5f5;
}

/* Google Tasks sync button */
.sync-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 0.75rem;
    cursor: pointer;
    color: #555;
    transition: all 0.15s;
}

.sync-btn:hover {
    border-color: #7E9A3A;
    color: #7E9A3A;
}

.sync-btn.syncing {
    opacity: 0.6;
    pointer-events: none;
}

.sync-btn.syncing svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Email performance KPI row */
.email-perf-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.email-perf-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.email-perf-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.email-perf-value.green { color: #7E9A3A; }

.email-perf-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.15rem;
}

/* === Customer Suppression Badges (Prospect Explorer) === */
.customer-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.4rem;
    vertical-align: middle;
    line-height: 1.4;
}
.customer-active {
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid #FFCC80;
}
.customer-dormant {
    background: #E3F2FD;
    color: #1565C0;
    border: 1px solid #90CAF9;
}
.customer-former {
    background: #F3E5F5;
    color: #7B1FA2;
    border: 1px solid #CE93D8;
}

/* === Customer Status Alert Banner (Contact Detail) === */
.customer-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}
.customer-alert-active {
    background: #FFF8E1;
    border-left-color: #F57C00;
    color: #E65100;
}
.customer-alert-dormant {
    background: #E8F5E9;
    border-left-color: #388E3C;
    color: #2E7D32;
}
.customer-alert-former {
    background: #F3E5F5;
    border-left-color: #7B1FA2;
    color: #6A1B9A;
}
.customer-alert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.customer-alert-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.customer-alert-content strong {
    font-size: 0.85rem;
}
.customer-alert-detail {
    font-size: 0.78rem;
    opacity: 0.85;
}
