/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy:       #0D1B2A;
  --navy-mid:   #1B3A5C;
  --blue:       #2E6DA4;
  --blue-light: #EBF4FF;
  --teal:       #1A7A6E;
  --teal-light: #E6F5F3;
  --bg:         #F5F7FA;
  --surface:    #FFFFFF;
  --border:     #E2E8F0;
  --text:       #1A202C;
  --text-sub:   #64748B;
  --text-hint:  #94A3B8;
  --radius:     10px;
  --radius-lg:  16px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow:     0 4px 16px rgba(0,0,0,.10);
  --sidebar-w:  220px;
}
html, body { height: 100%; font-family: 'Inter', sans-serif; font-size: 14px; color: var(--text); background: var(--bg); }
a { text-decoration: none; color: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }
.hidden { display: none !important; }

/* ── AUTH ─────────────────────────────────────────────────── */
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.auth-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #0D1B2A 0%, #1B3A5C 50%, #2E6DA4 100%); }
.auth-card { position: relative; z-index: 1; background: var(--surface); border-radius: 20px; padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: 0 24px 64px rgba(0,0,0,.25); }
.auth-logo { font-family: 'DM Serif Display', serif; font-size: 24px; color: var(--navy); margin-bottom: 4px; }
.logo-icon { color: var(--blue); }
.auth-tagline { font-size: 13px; color: var(--text-sub); margin-bottom: 1.75rem; }
.auth-error { font-size: 13px; color: #e53e3e; background: #FFF5F5; border: 1px solid #FED7D7; border-radius: 8px; padding: 10px 14px; margin-bottom: 1rem; display: none; }
.auth-error.show { display: block; }
.field-group { margin-bottom: 1rem; }
.field-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text-sub); margin-bottom: 5px; }
.field-group input { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px; outline: none; transition: border-color .2s; }
.field-group input:focus { border-color: var(--blue); }
.auth-divider { text-align: center; color: var(--text-hint); font-size: 12px; margin: 1rem 0; }
.auth-footer { text-align: center; font-size: 11px; color: var(--text-hint); margin-top: 1.25rem; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary { background: var(--blue); color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .2s, transform .1s; }
.btn-primary:hover { background: #1d5a8a; }
.btn-primary:active { transform: scale(.98); }
.btn-secondary { background: transparent; color: var(--text); border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 18px; font-size: 14px; cursor: pointer; transition: background .2s; }
.btn-secondary:hover { background: var(--bg); }
.full-width { width: 100%; }
.btn-icon { background: transparent; border: 1.5px solid var(--border); border-radius: 8px; padding: 8px 12px; color: var(--text-sub); cursor: pointer; transition: all .2s; }
.btn-icon:hover { background: var(--bg); color: var(--text); }
.btn-logout { background: transparent; border: none; color: var(--text-sub); font-size: 13px; cursor: pointer; padding: 6px 0; width: 100%; text-align: left; }
.btn-logout:hover { color: #e53e3e; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-danger { background: #FEF2F2; color: #e53e3e; border: 1px solid #FECACA; border-radius: 6px; padding: 5px 10px; cursor: pointer; font-size: 12px; }

/* ── APP SHELL ────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; overflow: hidden; }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar { background: var(--navy); display: flex; flex-direction: column; padding: 0; overflow-y: auto; }
.sidebar-logo { font-family: 'DM Serif Display', serif; font-size: 20px; color: #fff; padding: 1.5rem 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-section-label { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.35); padding: .75rem 1.25rem .25rem; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 1.25rem; font-size: 13px; color: rgba(255,255,255,.65); cursor: pointer; transition: all .15s; border-left: 3px solid transparent; }
.nav-item i { width: 16px; text-align: center; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: rgba(255,255,255,.10); border-left-color: #60A5FA; }
.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); }
.user-info { font-size: 12px; color: rgba(255,255,255,.5); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── MAIN ─────────────────────────────────────────────────── */
.main-content { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1.75rem; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.topbar-title { font-size: 17px; font-weight: 600; color: var(--navy); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ── PANELS ───────────────────────────────────────────────── */
.panel { display: none; flex: 1; overflow-y: auto; padding: 1.5rem 1.75rem; }
.panel.active { display: flex; flex-direction: column; gap: 1.25rem; }

/* ── DASHBOARD ────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm); }
.stat-card.wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 1rem; }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.stat-val { font-size: 26px; font-weight: 600; color: var(--navy); }
.stat-label { font-size: 12px; color: var(--text-sub); }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.dash-card.full-width { grid-column: span 2; }
.dash-card-title { font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 1rem; }

/* Status bars */
.status-bars { display: flex; flex-direction: column; gap: 8px; }
.status-bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.status-bar-label { width: 80px; color: var(--text-sub); flex-shrink: 0; }
.status-bar-track { flex: 1; height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.status-bar-fill { height: 100%; border-radius: 99px; transition: width .5s; }
.status-bar-count { width: 24px; text-align: right; font-weight: 500; color: var(--text); }

/* Activity feed */
.activity-feed { display: flex; flex-direction: column; gap: 10px; }
.activity-item { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex-shrink: 0; margin-top: 3px; }
.activity-text { color: var(--text); line-height: 1.5; }
.activity-time { color: var(--text-hint); white-space: nowrap; font-size: 11px; margin-top: 1px; }

/* Attention list */
.attention-list { display: flex; flex-direction: column; gap: 8px; }
.attention-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg); border-radius: 8px; font-size: 13px; }
.attention-name { font-weight: 500; color: var(--navy); }
.attention-meta { font-size: 12px; color: var(--text-sub); }

/* ── CONTACTS ─────────────────────────────────────────────── */
.panel-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.search-wrap { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 8px; padding: 8px 12px; flex: 1; min-width: 200px; }
.search-wrap i { color: var(--text-hint); }
.search-wrap input { border: none; outline: none; background: transparent; flex: 1; color: var(--text); }
.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ftab { padding: 6px 14px; border-radius: 99px; font-size: 12px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text-sub); transition: all .15s; }
.ftab:hover { border-color: var(--blue); color: var(--blue); }
.ftab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; cursor: pointer; transition: box-shadow .2s, transform .2s; box-shadow: var(--shadow-sm); }
.contact-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.contact-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; flex-shrink: 0; }
.contact-name { font-size: 14px; font-weight: 600; color: var(--navy); }
.contact-title { font-size: 12px; color: var(--text-sub); margin-top: 1px; }
.contact-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pill { font-size: 11px; padding: 3px 10px; border-radius: 99px; font-weight: 500; }
.pill-client { background: #EBF4FF; color: #1e4fa3; }
.pill-investor { background: #F0FDF4; color: #166534; }
.pill-partner { background: #FFF7ED; color: #9a3412; }
.pill-prospect { background: #FDF4FF; color: #6b21a8; }
.pill-source { background: var(--bg); color: var(--text-sub); }
.contact-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.contact-email { font-size: 12px; color: var(--blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-changed { font-size: 11px; color: #d97706; font-weight: 500; display: flex; align-items: center; gap: 4px; }

/* ── PIPELINE KANBAN ──────────────────────────────────────── */
.pipeline-kanban { display: flex; flex-direction: column; gap: 1rem; }
.kanban-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.kanban-section-hdr { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1.25rem; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; }
.kanban-status-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.kanban-dot { width: 10px; height: 10px; border-radius: 50%; }
.kanban-count { font-size: 12px; color: var(--text-sub); font-weight: 400; }
.kanban-body { padding: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.kanban-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: .875rem 1rem; background: var(--bg); border-radius: 8px; border-left: 3px solid transparent; transition: box-shadow .15s; cursor: pointer; }
.kanban-item:hover { box-shadow: var(--shadow-sm); }
.ki-name { font-weight: 600; font-size: 13px; color: var(--navy); }
.ki-meta { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.ki-desc { font-size: 11px; color: var(--text-hint); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.ki-val { font-size: 13px; font-weight: 600; color: var(--navy); white-space: nowrap; }
.ki-val span { font-size: 11px; font-weight: 400; color: var(--text-sub); }

/* Status colours */
.s-Early { color: #166534; } .dot-Early { background: #22c55e; } .border-Early { border-left-color: #22c55e; }
.s-Working { color: #1e4fa3; } .dot-Working { background: #6366f1; } .border-Working { border-left-color: #6366f1; }
.s-Term-Sheet { color: #9a3412; } .dot-Term-Sheet { background: #f97316; } .border-Term-Sheet { border-left-color: #f97316; }
.s-Document { color: #6b21a8; } .dot-Document { background: #a855f7; } .border-Document { border-left-color: #a855f7; }
.s-Won { color: #166534; } .dot-Won { background: #16a34a; } .border-Won { border-left-color: #16a34a; }
.s-KIV { color: #854d0e; } .dot-KIV { background: #eab308; } .border-KIV { border-left-color: #eab308; }
.s-Lost { color: #991b1b; } .dot-Lost { background: #ef4444; } .border-Lost { border-left-color: #ef4444; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.sb-Early { background: #F0FDF4; color: #166534; }
.sb-Working { background: #EEF2FF; color: #3730a3; }
.sb-Term-Sheet { background: #FFF7ED; color: #9a3412; }
.sb-Document { background: #FDF4FF; color: #6b21a8; }
.sb-Won { background: #DCFCE7; color: #166534; }
.sb-KIV { background: #FEFCE8; color: #854d0e; }
.sb-Lost { background: #FEF2F2; color: #991b1b; }

/* ── TABLE ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.crm-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 13px; }
.crm-table th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600; color: var(--text-sub); text-transform: uppercase; letter-spacing: .05em; background: var(--bg); border-bottom: 1px solid var(--border); white-space: nowrap; }
.crm-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.crm-table tr:last-child td { border-bottom: none; }
.crm-table tr:hover td { background: var(--bg); }
.crm-table td a { color: var(--blue); }
.tracker-section-label { font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 8px; display: inline-block; }
.orig-label { background: #EBF4FF; color: #1e4fa3; }
.inv-label { background: #F0FDF4; color: #166534; }

/* ── LINKEDIN ─────────────────────────────────────────────── */
.li-intro { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.li-big-icon { font-size: 36px; color: #0A66C2; flex-shrink: 0; }
.li-intro-title { font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.li-intro-sub { font-size: 13px; color: var(--text-sub); line-height: 1.6; }
.li-api-row { display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; }
.li-api-row input { flex: 1; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px; outline: none; }
.li-contacts-list { display: flex; flex-direction: column; gap: .75rem; }
.li-contact-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.25rem; display: flex; align-items: center; gap: 12px; }
.li-info { flex: 1; }
.li-name { font-weight: 600; font-size: 13px; color: var(--navy); }
.li-current { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.li-updated { font-size: 11px; color: var(--text-hint); margin-top: 2px; }

/* ── IMPORT ───────────────────────────────────────────────── */
.import-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.import-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem 1rem; text-align: center; cursor: pointer; transition: all .2s; }
.import-card:hover, .import-card.active { border-color: var(--blue); background: var(--blue-light); }
.import-icon { font-size: 28px; margin-bottom: 10px; }
.import-name { font-weight: 600; font-size: 13px; color: var(--navy); }
.import-desc { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.import-area { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.import-area textarea { width: 100%; height: 120px; border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 12px; font-family: monospace; font-size: 13px; resize: vertical; outline: none; }
.import-area input[type=file] { display: block; margin-bottom: 1rem; }
.parsed-preview { background: var(--bg); border-radius: 8px; padding: 1rem; margin-top: 1rem; font-size: 13px; }
.parsed-row { display: flex; gap: 10px; padding: 4px 0; }
.parsed-key { color: var(--text-sub); width: 100px; flex-shrink: 0; font-size: 12px; }
.parsed-val { color: var(--text); font-weight: 500; }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-box { background: var(--surface); border-radius: 16px; width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,.2); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 16px; font-weight: 600; color: var(--navy); }
.modal-close { background: none; border: none; font-size: 18px; color: var(--text-sub); cursor: pointer; padding: 4px; border-radius: 6px; }
.modal-close:hover { background: var(--bg); }
.modal-body { flex: 1; overflow-y: auto; padding: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: .875rem; }
.modal-body .full { grid-column: span 2; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 12px; font-weight: 500; color: var(--text-sub); }
.form-field input, .form-field select, .form-field textarea { padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px; outline: none; font-size: 13px; transition: border-color .2s; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--blue); }
.form-field textarea { resize: vertical; min-height: 70px; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ── TOAST ────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 13px; font-weight: 500; z-index: 2000; box-shadow: var(--shadow); animation: slideUp .3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── MISC ─────────────────────────────────────────────────── */
.badge-count { background: #ef4444; color: #fff; font-size: 11px; border-radius: 99px; padding: 1px 7px; margin-left: 6px; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-sub); }
.empty-state i { font-size: 36px; color: var(--text-hint); display: block; margin-bottom: .75rem; }
.link-badge { font-size: 11px; background: #F0FDF4; color: #166534; border-radius: 99px; padding: 2px 8px; }

/* ── NOTES COMPOSER ──────────────────────────────────────── */
.note-type-btn:hover { opacity: .85; }
.note-type-btn.active { font-weight: 500; }

/* ── CALENDAR ──────────────────────────────────────────────── */
.cal-day { background: var(--surface); padding: 6px; min-height: 80px; border-right: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background .1s; }
.cal-day:hover { background: var(--bg); }
.cal-day.today { background: #EEF2FF; }
.cal-day.other-month { background: var(--bg); }
.cal-day-num { font-size: 12px; font-weight: 500; color: var(--text-sub); margin-bottom: 4px; }
.cal-day.today .cal-day-num { color: #6366f1; font-weight: 700; }
.cal-event { font-size: 10px; padding: 2px 5px; border-radius: 4px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal-event.personal { background: #EEF2FF; color: #3730a3; }
.cal-event.work { background: #FFF7ED; color: #9a3412; }
.cal-event.deal { background: #F0FDF4; color: #166534; }

/* ── TODO ──────────────────────────────────────────────────── */
.todo-col { background: var(--bg); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: 8px; }
.todo-col-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-sub); margin-bottom: 4px; display: flex; align-items: center; justify-content: space-between; }
.todo-item { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; cursor: pointer; transition: box-shadow .15s; border-left: 3px solid transparent; }
.todo-item:hover { box-shadow: var(--shadow-sm); }
.todo-item.done { opacity: .5; }
.todo-item.done .todo-title { text-decoration: line-through; }
.todo-title { font-size: 13px; font-weight: 500; color: var(--navy); margin-bottom: 3px; }
.todo-meta { font-size: 11px; color: var(--text-sub); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.todo-tag { font-size: 10px; padding: 1px 7px; border-radius: 99px; }
.prio-high { border-left-color: #ef4444; background: #FEF2F2; }
.prio-med { border-left-color: #f97316; background: var(--surface); }
.prio-low { border-left-color: #22c55e; background: var(--surface); }

/* ── COMPANIES ─────────────────────────────────────────────── */
.company-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.25rem; display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 12px; cursor: pointer; transition: box-shadow .15s; }
.company-card:hover { box-shadow: var(--shadow-sm); }
.company-avatar { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }

/* ── FORECAST ──────────────────────────────────────────────── */
.stage-fc-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 0.5px solid var(--border); font-size: 13px; }
.stage-fc-name { width: 100px; color: var(--text-sub); font-size: 12px; }
.stage-fc-bar-wrap { flex: 1; height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.stage-fc-bar { height: 100%; border-radius: 99px; }
.stage-fc-val { font-weight: 600; color: var(--navy); width: 60px; text-align: right; font-size: 12px; }
.prob-pill { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--bg); border-radius: 8px; font-size: 12px; }
.prob-input { width: 52px; border: 1px solid var(--border); border-radius: 6px; padding: 3px 6px; font-size: 12px; text-align: center; }

/* ── AI CHAT ───────────────────────────────────────────────── */
.ai-prompt-chip { padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; color: var(--text); cursor: pointer; transition: all .15s; }
.ai-prompt-chip:hover { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }
.ai-msg { display: flex; gap: 8px; align-items: flex-start; }
.ai-msg-assistant { justify-content: flex-start; }
.ai-msg-user { justify-content: flex-end; }
.ai-msg-bubble { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.6; }
.ai-msg-assistant .ai-msg-bubble { background: var(--bg); color: var(--text); border-bottom-left-radius: 4px; }
.ai-msg-user .ai-msg-bubble { background: #534AB7; color: #fff; border-bottom-right-radius: 4px; }
.ai-msg-bubble p { margin: 0 0 .5em; }
.ai-msg-bubble p:last-child { margin: 0; }
.ai-msg-bubble strong { font-weight: 600; }
.ai-msg-bubble ul, .ai-msg-bubble ol { padding-left: 1.25em; margin: .25em 0; }
.ai-msg-bubble li { margin: .15em 0; }
.ai-quick-btn { padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: 11px; cursor: pointer; color: var(--text-sub); transition: all .15s; }
.ai-quick-btn:hover { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }
.ai-typing { display: flex; gap: 4px; align-items: center; padding: 10px 14px; background: var(--bg); border-radius: 12px; border-bottom-left-radius: 4px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-hint); animation: aiPulse 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aiPulse { 0%,80%,100%{opacity:.3;transform:scale(.8)} 40%{opacity:1;transform:scale(1)} }

/* ── QUICK ADD BAR ──────────────────────────────────────────── */
#quick-add-bar input, #quick-add-bar select { font-size: 13px; padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 8px; outline: none; transition: border-color .2s; }
#quick-add-bar input:focus, #quick-add-bar select:focus { border-color: var(--blue); }

/* ── INLINE EDIT ACTIONS ────────────────────────────────────── */
.row-actions { display: none; gap: 4px; }
.contact-card:hover .row-actions, .kanban-item:hover .row-actions, .crm-table tr:hover .row-actions { display: flex; }
.action-btn-sm { padding: 3px 8px; font-size: 11px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text-sub); }
.action-btn-sm:hover { background: var(--bg); color: var(--text); }
.action-btn-del { border-color: #FECACA; color: #e53e3e; }
.action-btn-del:hover { background: #FEF2F2; }
