/* REACH_OS — Design System v2 */

:root {
    --color-primary: #D4F01E;
    --color-primary-hover: #c8e319;
    --color-primary-text: #1A1A1A;
    --color-primary-light: rgba(212,240,30,0.15);
    --color-brand-green: #18B870;
    --color-brand-indigo: #6366f1;
    --color-bg: #F4F4F4;
    --color-surface: #FFFFFF;
    --color-border: #E8E8E8;
    --color-text-primary: #1A1A1A;
    --color-text-secondary: #7A7A7A;
    --color-text-muted: #ABABAB;
    --color-sidebar: #1A1A1A;
    --color-sidebar-text: #FFFFFF;
    --color-sidebar-muted: rgba(255,255,255,0.45);
    --color-sidebar-active-bg: rgba(212,240,30,0.15);
    --color-sidebar-active-text: #D4F01E;
    --color-danger: #ef4444;
    --color-danger-hover: #dc2626;
    --color-success: #18B870;
    --color-warning: #f59e0b;
    --sidebar-width: 220px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 100px;
    --shadow-card: 0px 10px 30px rgba(0,0,0,0.05);
    --shadow-elevated: 0px 20px 40px rgba(0,0,0,0.08);
    --transition: 0.15s ease;
}

/* ========================================
   Reset & Base
   ======================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1 {
    font-family: 'Syne', sans-serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text-primary);
}

h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* ========================================
   Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

/* ========================================
   Logo
   ======================================== */

.logo-text {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 28px;
    color: var(--color-text-primary);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--color-primary);
}

/* ========================================
   Login Page
   ======================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    padding: 20px;
}

.login-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-elevated);
    padding: 48px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    margin-bottom: 12px;
}

.login-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.login-subtitle {
    color: var(--color-text-secondary);
    font-size: 13px;
}

.login-error {
    color: var(--color-danger);
    font-size: 13px;
    min-height: 20px;
    margin-bottom: 4px;
    text-align: center;
}

/* ========================================
   App Layout
   ======================================== */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ========================================
   Sidebar (Dark)
   ======================================== */

.sidebar {
    width: 70px;
    background: var(--color-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    padding: 15px;
    border-radius: 16px;
    margin: 15px 0 15px 15px;
    height: calc(100vh - 30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 100;
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.sidebar-section-label {
    display: none;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    align-items: center;
}

.sidebar-item {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all var(--transition);
    text-decoration: none;
    border: none;
    background: none;
    color: rgba(255,255,255,0.55);
    position: relative;
}

.sidebar-item span {
    display: none;
}

.sidebar-item:hover {
    color: var(--color-sidebar-text);
    background: rgba(255,255,255,0.07);
}

.sidebar-item.active {
    color: var(--color-sidebar-active-text);
    background: rgba(212,240,30,0.15);
}

.sidebar-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Tooltip on hover */
.sidebar-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-sidebar);
    color: var(--color-sidebar-text);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 200;
}

.sidebar-item:hover::after {
    opacity: 1;
}

.sidebar-footer {
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 12px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(212,240,30,0.2);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-name,
.sidebar-user-email {
    display: none;
}

/* ========================================
   Main Content
   ======================================== */

.main-content {
    margin-left: calc(70px + 30px);
    flex: 1;
    padding: 32px;
    background: var(--color-bg);
    min-height: 100vh;
}

/* ========================================
   Page Header
   ======================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.page-title {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

.page-subtitle {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

/* ========================================
   Cards
   ======================================== */

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.card-sm {
    padding: 20px;
    border-radius: var(--radius-md);
}

.card-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
}

/* ========================================
   KPI Grid
   ======================================== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

/* ========================================
   Daily Goals
   ======================================== */

.goal-bar-wrap {
    background: var(--color-bg);
    border-radius: var(--radius-pill);
    height: 8px;
    overflow: hidden;
    margin: 8px 0;
}

.goal-bar {
    background: var(--color-primary);
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-sidebar);
    color: var(--color-primary);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    background: var(--color-surface);
    color: var(--color-text-primary);
}

.btn:hover {
    background: var(--color-bg);
}

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

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

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

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

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

.btn-danger {
    background: #fef2f2;
    color: var(--color-danger);
}

.btn-danger:hover {
    background: #fee2e2;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

.btn-block {
    width: 100%;
}

/* ========================================
   Badges
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
}

.badge-animotion {
    background: #dcfce7;
    color: #166534;
}

.badge-advox {
    background: #ede9fe;
    color: #4c1d95;
}

.badge-both {
    background: #fef9c3;
    color: #854d0e;
}

.badge-new {
    background: #f0fdf4;
    color: #166534;
}

.badge-connected {
    background: #eff6ff;
    color: #1e40af;
}

.badge-outreach {
    background: #fdf4ff;
    color: #7e22ce;
}

.badge-in-contact {
    background: #fff7ed;
    color: #9a3412;
}

.badge-follow-up {
    background: #fefce8;
    color: #854d0e;
}

.badge-not-interested {
    background: #f9fafb;
    color: #6b7280;
}

.badge-won {
    background: var(--color-primary);
    color: var(--color-primary-text);
}

.badge-lost {
    background: #fee2e2;
    color: #991b1b;
}

.badge-green {
    background: #dcfce7;
    color: #15803d;
}

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-yellow {
    background: #fef3c7;
    color: #92400e;
}

.badge-red {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-gray {
    background: #f3f4f6;
    color: #4b5563;
}

/* ========================================
   Forms
   ======================================== */

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    color: var(--color-text-primary);
    background: var(--color-surface);
    outline: none;
    transition: all var(--transition);
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(212,240,30,0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237A7A7A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ========================================
   Tables
   ======================================== */

.table-wrap {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #FAFAFA;
    border-bottom: 1px solid #F0F0F0;
}

.table td {
    padding: 14px 20px;
    font-size: 13px;
    color: var(--color-text-primary);
    border-bottom: 1px solid #F8F8F8;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: background var(--transition);
}

.table tbody tr:hover td {
    background: #FAFAFA;
}

/* ========================================
   Empty State
   ======================================== */

.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-bg);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.empty-state-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

.empty-state-text {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* ========================================
   Modal
   ======================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-elevated);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--color-bg);
    color: var(--color-text-primary);
}

/* ========================================
   Toast
   ======================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--color-sidebar);
    color: var(--color-sidebar-text);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    min-width: 260px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-elevated);
    animation: toastIn 0.25s ease;
}

.toast.success {
    border-left: 3px solid var(--color-primary);
}

.toast.error {
    border-left: 3px solid var(--color-danger);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Glass Card
   ======================================== */

.glass-card {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--radius-lg);
    padding: 24px;
}

/* ========================================
   Utilities
   ======================================== */

.text-muted { color: var(--color-text-secondary); }
.text-sm { font-size: 12px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ========================================
   Toolbar / Filters
   ======================================== */

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    padding: 8px 14px 8px 36px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 13px;
    color: var(--color-text-primary);
    background: var(--color-surface);
    outline: none;
    transition: all var(--transition);
    width: 220px;
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(212,240,30,0.15);
}

.search-wrap {
    position: relative;
}

.search-wrap svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--color-text-muted);
    pointer-events: none;
}

.filter-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-primary);
    background: var(--color-surface);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237A7A7A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    outline: none;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-select:focus {
    border-color: var(--color-primary);
}

/* ========================================
   Table Enhancements
   ======================================== */

.table tbody tr {
    cursor: pointer;
}

.table .contact-name {
    font-weight: 600;
    color: var(--color-text-primary);
}

.table .contact-company {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 1px;
}

.table .date-overdue {
    color: var(--color-danger);
    font-weight: 600;
}

.table .action-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.table .action-icons button,
.table .action-icons a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    text-decoration: none;
}

.table .action-icons button:hover,
.table .action-icons a:hover {
    background: var(--color-bg);
    color: var(--color-text-primary);
}

.avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ========================================
   Detail Panel (Slide-in)
   ======================================== */

.detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.detail-overlay.open {
    opacity: 1;
}

.detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    background: var(--color-surface);
    box-shadow: -8px 0 30px rgba(0,0,0,0.1);
    z-index: 151;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.detail-panel.open {
    transform: translateX(0);
}

.detail-panel-header {
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
}

.detail-panel-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.detail-panel-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
}

/* Status Pills */
.status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
}

.status-pill {
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.status-pill:hover {
    border-color: var(--color-text-muted);
}

.status-pill.active {
    background: var(--color-primary);
    color: var(--color-primary-text);
    border-color: var(--color-primary);
}

/* Detail Tabs */
.detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    padding: 0 24px;
}

.detail-tab {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.detail-tab:hover {
    color: var(--color-text-primary);
}

.detail-tab.active {
    color: var(--color-primary-text);
    border-bottom-color: var(--color-primary);
}

.detail-info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #F8F8F8;
    font-size: 13px;
}

.detail-info-label {
    color: var(--color-text-muted);
    font-size: 12px;
}

.detail-info-value {
    color: var(--color-text-primary);
    font-weight: 500;
    text-align: right;
}

.detail-info-value a {
    color: var(--color-brand-indigo);
    text-decoration: none;
}

.detail-info-value a:hover {
    text-decoration: underline;
}

/* ========================================
   Form Row (two cols)
   ======================================== */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ========================================
   Checkbox Group
   ======================================== */

.checkbox-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* ========================================
   Pagination
   ======================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pagination button {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.pagination button:hover {
    background: var(--color-bg);
}

.pagination button.active {
    background: var(--color-primary);
    color: var(--color-primary-text);
    border-color: var(--color-primary);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========================================
   Activity Timeline
   ======================================== */

.activity-timeline {
    position: relative;
    padding-left: 20px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #F0F0F0;
}

.activity-item {
    position: relative;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F8F8F8;
}

.activity-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.activity-dot {
    position: absolute;
    left: -16px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid var(--color-surface);
}

.activity-type {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 3px;
}

.activity-note {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.activity-meta {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 4px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.template-badge {
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 10px;
    background: #F4F4F4;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.activity-form {
    background: #FAFAFA;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #F0F0F0;
}

.template-preview {
    background: #F4F4F4;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-height: 80px;
    overflow-y: auto;
    margin-top: 6px;
    white-space: pre-wrap;
}

/* ========================================
   Company Grid & Cards
   ======================================== */

.company-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.company-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: box-shadow var(--transition);
}

.company-card:hover {
    box-shadow: 0px 20px 40px rgba(0,0,0,0.1);
}

.company-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--color-primary);
    color: var(--color-primary-text);
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ========================================
   Detail Sections (Company/Contact panels)
   ======================================== */

.detail-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #F4F4F4;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.detail-row svg {
    width: 14px;
    height: 14px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-row a {
    color: var(--color-primary-text);
    text-decoration: none;
}

.detail-row a:hover {
    text-decoration: underline;
}

/* ========================================
   Contact List Items (in company detail)
   ======================================== */

.contact-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #F8F8F8;
    cursor: pointer;
    transition: background var(--transition);
    border-radius: 8px;
}

.contact-list-item:hover {
    background: #FAFAFA;
    margin: 0 -16px;
    padding: 10px 16px;
}

.contact-list-item:last-child {
    border-bottom: none;
}

/* ========================================
   Pipe / Kanban Board
   ======================================== */

.pipe-board {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 20px;
    align-items: flex-start;
    min-height: 70vh;
}

.pipe-column {
    flex-shrink: 0;
    width: 240px;
    display: flex;
    flex-direction: column;
}

.pipe-column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    margin-bottom: 8px;
}

.pipe-column-header .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pipe-column-header .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.pipe-column-header .count {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    background: #F4F4F4;
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    margin-left: auto;
}

.pipe-column-body {
    flex: 1;
    min-height: 200px;
}

.opp-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--transition);
}

.opp-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.opp-card[draggable="true"] { cursor: grab; }
.opp-card[draggable="true"]:active { cursor: grabbing; }
.opp-card.dragging { opacity: 0.4; transform: scale(0.98); }

.pipe-column-body.drag-over {
    background: rgba(212,240,30,0.06);
    border-radius: 12px;
    outline: 2px dashed rgba(212,240,30,0.4);
    outline-offset: -4px;
}

.opp-empty {
    border: 2px dashed var(--color-border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 12px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Stage Pills (reused in detail panel)
   ======================================== */

.stage-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
}

.stage-pill {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    white-space: nowrap;
    transition: all var(--transition);
    background: var(--color-surface);
    font-family: inherit;
}

.stage-pill:hover {
    border-color: var(--color-text-muted);
}

.stage-pill.active {
    background: var(--color-primary);
    color: var(--color-primary-text);
    border-color: var(--color-primary);
}

/* ========================================
   Brand Toggle (Pill-style segmented control)
   ======================================== */

.brand-toggle {
    display: flex;
    gap: 4px;
    background: #F4F4F4;
    border-radius: var(--radius-pill);
    padding: 3px;
}

.brand-toggle-btn {
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    transition: all var(--transition);
    font-family: inherit;
}

.brand-toggle-btn.active {
    background: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* ========================================
   Autosuggest
   ======================================== */

.autosuggest-wrap {
    position: relative;
}

.autosuggest-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid var(--color-border);
    z-index: 100;
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
}

.autosuggest-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #F8F8F8;
    transition: background 0.1s;
}

.autosuggest-item:hover {
    background: #F4F4F4;
}

.autosuggest-item:last-child {
    border-bottom: none;
}

.autosuggest-new-company {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-primary);
    background: var(--color-sidebar);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.autosuggest-new-company:hover {
    background: #2a2a2a;
}

.inline-company-form {
    background: #F8F8F8;
    border-radius: 10px;
    padding: 12px;
    margin-top: 8px;
    border: 1px solid #F0F0F0;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ========================================
   Activity Type Icons (colored dots)
   ======================================== */

.activity-dot-linkedin { background: #0a66c2; }
.activity-dot-message  { background: #6366f1; }
.activity-dot-email    { background: #7A7A7A; }
.activity-dot-call     { background: #18B870; }
.activity-dot-missed   { background: #EF9F27; }
.activity-dot-note     { background: #ABABAB; }
.activity-dot-system   { background: #D4F01E; }

/* ========================================
   Settings
   ======================================== */

.settings-tabs {
    display: flex;
    gap: 4px;
    background: #F4F4F4;
    border-radius: var(--radius-pill);
    padding: 3px;
    margin-bottom: 28px;
    width: fit-content;
}

.settings-tab {
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    transition: all var(--transition);
    font-family: inherit;
}

.settings-tab.active {
    background: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.template-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid #F0F0F0;
    transition: border-color var(--transition);
    margin-bottom: 8px;
}

.template-card:hover {
    border-color: #E0E0E0;
}

.char-counter {
    font-size: 11px;
    color: var(--color-text-muted);
    text-align: right;
    margin-top: 4px;
}

.char-counter.warning { color: #f59e0b; }
.char-counter.danger { color: #ef4444; }

.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.team-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    position: relative;
}

.inline-confirm {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.inline-confirm-yes {
    font-size: 12px;
    color: var(--color-danger);
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #fca5a5;
    background: #fef2f2;
    white-space: nowrap;
    font-family: inherit;
}

.inline-confirm-yes:hover { background: #fee2e2; }

.inline-confirm-no {
    font-size: 12px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: none;
    font-family: inherit;
}

.segmented-control {
    display: flex;
    background: #F4F4F4;
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 2px;
}

.segmented-btn {
    flex: 1;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--color-text-secondary);
    transition: all var(--transition);
    text-align: center;
    font-family: inherit;
}

.segmented-btn.active {
    background: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ========================================
   Scoring
   ======================================== */

.score-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
}

.score-hot  { background: #D4F01E; color: #1A1A1A; }
.score-warm { background: #FEF9C3; color: #854D0E; }
.score-cool { background: #F4F4F4; color: #6B7280; }
.score-cold { background: #FEE2E2; color: #991B1B; }

.next-action-today   { color: var(--color-primary-text); font-weight: 600; }
.next-action-overdue { color: var(--color-danger); font-weight: 600; }
.next-action-future  { color: var(--color-text-secondary); }

.today-actions-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.today-action-card {
    min-width: 200px;
    flex-shrink: 0;
    background: var(--color-surface);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid #F0F0F0;
}

.today-action-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* ========================================
   Status Quick-Change Dropdown
   ======================================== */

.status-dropdown {
    position: absolute;
    z-index: 50;
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid var(--color-border);
    overflow: hidden;
    min-width: 180px;
}

.status-dropdown-item {
    padding: 9px 14px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
}

.status-dropdown-item:hover {
    background: #F4F4F4;
}

/* ========================================
   Sidebar Count Badge
   ======================================== */

.sidebar-count {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    font-size: 9px;
    font-weight: 700;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212,240,30,0.3);
    color: var(--color-primary);
    border-radius: var(--radius-pill);
    font-family: 'Syne', sans-serif;
}

/* ========================================
   Page Transitions
   ======================================== */

#main-content {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Focus Styles
   ======================================== */

button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 900px) {
    .sidebar { margin: 10px 0 10px 10px; height: calc(100vh - 20px); }
    .main-content { margin-left: calc(70px + 20px); padding: 20px 16px; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .company-grid { grid-template-columns: 1fr 1fr; }
    .team-grid { grid-template-columns: 1fr; }
}

/* ========================================
   Mobile Navigation
   ======================================== */

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #1A1A1A;
    border-radius: 20px 20px 0 0;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
    color: rgba(255,255,255,0.45);
    border: none;
    background: transparent;
    flex: 1;
    font-family: inherit;
}

.mobile-nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

.mobile-nav-item span {
    font-size: 10px;
    font-weight: 500;
}

.mobile-nav-item.active {
    color: #D4F01E;
}

.mobile-nav-item:hover {
    color: white;
}

@media (max-width: 600px) {
    .sidebar { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 16px 12px 80px !important; }
    .kpi-grid { grid-template-columns: 1fr !important; }
    .company-grid { grid-template-columns: 1fr !important; }
    .pipe-board { padding-bottom: 80px; }
    .mobile-nav { display: flex !important; }
}

/* ========================================
   Print
   ======================================== */

@media print {
    .sidebar, .page-header button, .toolbar, .toast-container { display: none; }
    .main-content { margin-left: 0; }
    .card { box-shadow: none; border: 1px solid var(--color-border); }
}
