*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: #2B5A8E; --blue-dark: #1E4070; --blue-light: #EBF2FA;
  --magenta: #E91E8C; --magenta-light: #FDE8F4;
  --green: #10B981; --red: #EF4444; --amber: #F59E0B;
  --sidebar-bg: #1E2A3A; --sidebar-w: 220px;
  --gray-50: #F5F5F5; --gray-100: #E5E7EB; --gray-200: #D1D5DB;
  --gray-400: #9CA3AF; --gray-600: #666; --gray-700: #555; --gray-800: #333; --gray-900: #1A1A1A;
  --white: #fff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 10px; --radius-sm: 6px;
}
html, body { height: 100%; }
body { font-family: 'Inter', sans-serif; background: var(--gray-50); color: var(--gray-900); }
h1,h2,h3 { font-family: 'Montserrat', sans-serif; }

/* -- LOGIN -- */
.login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1E2A3A 0%, #2B5A8E 100%); }
.login-card { background: var(--white); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); padding: 56px 44px; text-align: center; max-width: 420px; width: 100%; }
.login-logo-wrap { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }
.login-logo-wrap img { height: 44px; }
.login-logo-wrap span { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 26px; color: var(--blue); }
.login-subtitle { font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 600; color: var(--gray-400); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 28px; }
.login-desc { font-size: 14px; color: var(--gray-600); margin-bottom: 32px; line-height: 1.6; }
.login-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--white); border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); padding: 13px 28px; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; color: var(--gray-800); cursor: pointer; transition: all 0.2s; }
.login-btn:hover { border-color: var(--blue); box-shadow: 0 4px 12px rgba(43,90,142,0.15); transform: translateY(-1px); }
.login-restriction { font-size: 12px; color: var(--gray-400); margin-top: 20px; }
.login-error { color: var(--red); font-size: 13px; margin-top: 16px; display: none; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--gray-400); font-size: 12px; font-weight: 500; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.login-form { text-align: left; }
.login-form .form-group { margin-bottom: 14px; }
.login-form .form-label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-600); margin-bottom: 5px; }
.login-form .form-input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 14px; font-family: 'Inter', sans-serif; color: var(--gray-900); outline: none; transition: border-color 0.2s; }
.login-form .form-input:focus { border-color: var(--blue); }
.login-submit { width: 100%; padding: 12px; background: var(--blue); color: #fff; border: none; border-radius: var(--radius-sm); font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.login-submit:hover { background: var(--blue-dark); }
.login-submit:disabled { background: #9DB8D6; cursor: not-allowed; }
.login-toggle { font-size: 13px; color: var(--blue); cursor: pointer; margin-top: 12px; font-weight: 500; }
.login-toggle:hover { text-decoration: underline; }

/* -- SIDEBAR -- */
.sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh; background: var(--sidebar-bg); display: flex; flex-direction: column; z-index: 100; transition: transform 0.3s ease; overflow-y: auto; }
.sidebar-brand { padding: 20px 18px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-brand img { height: 32px; }
.sidebar-brand-text { display: flex; flex-direction: column; }
.sidebar-brand-text .brand-name { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 16px; color: #fff; }
.sidebar-brand-text .brand-label { font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.45); letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-section { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.35); letter-spacing: 0.1em; text-transform: uppercase; padding: 16px 18px 6px; }
.sidebar-item { display: flex; align-items: center; gap: 10px; padding: 9px 18px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.7); cursor: pointer; border-left: 3px solid transparent; transition: all 0.15s; user-select: none; }
.sidebar-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.sidebar-item.active { color: #fff; background: rgba(255,255,255,0.08); border-left-color: var(--blue); }
.sidebar-item svg { width: 16px; height: 16px; opacity: 0.7; flex-shrink: 0; }
.sidebar-item.active svg { opacity: 1; }
.sidebar-links { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 9px 18px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.7); text-decoration: none; border-left: 3px solid transparent; transition: all 0.15s; }
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.sidebar-link svg { width: 16px; height: 16px; opacity: 0.7; flex-shrink: 0; }
.sidebar-link-ext { width: 12px; height: 12px; opacity: 0.4; margin-left: auto; }
.sidebar-sync { padding: 10px 18px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: rgba(255,255,255,0.5); border-top: 1px solid rgba(255,255,255,0.08); }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gray-400); flex-shrink: 0; }
.sync-dot.connected { background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.sidebar-user { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 10px; }
.sidebar-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { font-size: 10px; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-signout { background: none; border: 1px solid rgba(255,255,255,0.2); border-radius: 4px; color: rgba(255,255,255,0.6); font-size: 10px; padding: 4px 8px; cursor: pointer; font-family: 'Inter', sans-serif; white-space: nowrap; }
.sidebar-signout:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* -- HAMBURGER (mobile) -- */
.hamburger { display: none; position: fixed; top: 12px; left: 12px; z-index: 200; background: var(--sidebar-bg); border: none; border-radius: 6px; padding: 8px; cursor: pointer; color: #fff; }
.hamburger svg { width: 22px; height: 22px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; }

@media (max-width: 768px) {
  .hamburger { display: block; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0 !important; }
}

/* -- MAIN -- */
.main-content { margin-left: var(--sidebar-w); min-height: 100vh; }
.section { display: none; padding: 32px; max-width: 1100px; }
.section.active { display: block; }
.section-title { font-size: 22px; font-weight: 800; color: var(--gray-900); margin-bottom: 6px; }
.section-sub { font-size: 14px; color: var(--gray-600); margin-bottom: 28px; line-height: 1.6; }

/* -- CARDS & FORMS -- */
.card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 20px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 6px; }
.form-input { width: 100%; padding: 9px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 14px; font-family: 'Inter', sans-serif; color: var(--gray-900); outline: none; transition: border-color 0.15s; background: var(--white); }
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43,90,142,0.08); }
textarea.form-input { resize: vertical; min-height: 60px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--blue); }
.range-val { font-size: 14px; font-weight: 600; color: var(--blue); min-width: 90px; text-align: right; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 20px 0; }
.metric-card { background: var(--gray-50); border-radius: var(--radius-sm); padding: 16px; }
.metric-label { font-size: 11px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.metric-value { font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 800; color: var(--gray-900); }
.metric-value.highlight { color: var(--blue); }
.metric-value.danger { color: var(--red); }
.metric-value.success { color: var(--green); }
.btn-primary { background: var(--blue); color: var(--white); border: none; border-radius: var(--radius-sm); padding: 11px 24px; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled { background: #9DB8D6; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); border-radius: var(--radius-sm); padding: 10px 22px; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.btn-secondary:hover { background: var(--blue-light); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-danger { background: var(--red); color: #fff; border: none; border-radius: var(--radius-sm); padding: 7px 14px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; }
.btn-danger:hover { background: #DC2626; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.tag-blue { background: var(--blue-light); color: #185FA5; }
.tag-green { background: #EAF3DE; color: #3B6D11; }
.tag-amber { background: #FAEEDA; color: #854F0B; }
.tag-magenta { background: var(--magenta-light); color: #99125A; }
.tag-red { background: #FDECEA; color: #991B1B; }
.divider { height: 1px; background: var(--gray-100); margin: 24px 0; }
.result-box { background: var(--blue-light); border: 1.5px solid #B5D4F4; border-radius: var(--radius); padding: 20px 24px; margin-top: 20px; }
.result-box h3 { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.notice { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 12px; color: #92400E; margin-bottom: 20px; }

/* -- DASHBOARD -- */
.dash-welcome { font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 800; color: var(--gray-900); margin-bottom: 24px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.kpi-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.kpi-card .kpi-label { font-size: 11px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.kpi-card .kpi-value { font-family: 'Montserrat', sans-serif; font-size: 28px; font-weight: 800; }
.kpi-card .kpi-sub { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.dash-row { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* -- PRICING -- */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.pricing-card { border: 1.5px solid var(--gray-100); border-radius: var(--radius); overflow: hidden; }
.pricing-card.featured { border-color: var(--blue); }
.pricing-header { padding: 18px 18px 14px; border-bottom: 1px solid var(--gray-100); }
.pricing-name { font-family: 'Montserrat', sans-serif; font-size: 16px; font-weight: 800; color: var(--gray-900); margin-bottom: 2px; }
.pricing-vol { font-size: 13px; color: var(--blue); font-weight: 600; margin-bottom: 4px; }
.pricing-price-monthly { font-size: 22px; font-weight: 800; font-family: 'Montserrat', sans-serif; color: var(--gray-900); }
.pricing-price-annual { font-size: 13px; color: var(--green); font-weight: 600; }
.pricing-setup { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.pricing-body { padding: 14px 18px; }
.feature-row { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: 12px; color: var(--gray-700); border-bottom: 1px solid var(--gray-50); }
.feature-row:last-child { border-bottom: none; }

/* -- QUIZ -- */
.quiz-opt { border: 1.5px solid var(--gray-100); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; transition: border-color 0.15s, background 0.15s; }
.quiz-opt:hover { border-color: var(--blue); background: var(--blue-light); }
.quiz-opt.selected { border-color: var(--blue); background: var(--blue-light); }
.quiz-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--gray-200); flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center; }
.quiz-opt.selected .quiz-radio { border-color: var(--blue); background: var(--blue); }
.quiz-opt.selected .quiz-radio::after { content:''; width:7px; height:7px; border-radius:50%; background:#fff; display:block; }
.prog-bar { height: 4px; background: var(--gray-100); border-radius: 2px; margin-bottom: 24px; }
.prog-fill { height: 100%; background: var(--blue); border-radius: 2px; transition: width 0.4s; }

/* -- SCORECARD -- */
.score-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.score-label { font-size: 13px; color: var(--gray-800); width: 200px; flex-shrink: 0; }
.score-track { flex: 1; height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.score-val { font-size: 13px; font-weight: 600; color: var(--gray-800); width: 36px; text-align: right; }

/* -- PIPELINE (Enhanced Kanban) -- */
.pipeline-stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.pipeline-col { background: var(--gray-50); border-radius: var(--radius); padding: 12px; min-height: 200px; }
.pipeline-col-header { font-size: 11px; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.pipeline-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow-sm); cursor: pointer; transition: box-shadow 0.15s; }
.pipeline-card:hover { box-shadow: var(--shadow-md); }
.pipeline-company { font-size: 13px; font-weight: 600; color: var(--gray-900); margin-bottom: 2px; }
.pipeline-contact { font-size: 12px; color: var(--gray-400); }
.pipeline-deal { font-size: 13px; font-weight: 700; color: var(--blue); margin-top: 6px; }
.pipeline-meta { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.pipeline-actions { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.pipe-action-btn { font-size: 10px; font-weight: 600; border: none; border-radius: 4px; padding: 3px 8px; cursor: pointer; font-family: 'Inter', sans-serif; }

/* -- CONTACTS TABLE -- */
.contacts-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.contacts-table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px; border-bottom: 2px solid var(--gray-100); }
.contacts-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); color: var(--gray-800); }
.contacts-table tr:hover td { background: var(--gray-50); }
.contact-status { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.contact-status.active { background: #DCFCE7; color: #166534; }
.contact-status.inactive { background: var(--gray-100); color: var(--gray-600); }

/* -- ACTIVITY LOG -- */
.activity-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-icon.call { background: #DBEAFE; color: #2563EB; }
.activity-icon.email { background: #FDE8F4; color: var(--magenta); }
.activity-icon.meeting { background: #DCFCE7; color: #166534; }
.activity-icon.note { background: #FAEEDA; color: #854F0B; }
.activity-content { flex: 1; }
.activity-title { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.activity-desc { font-size: 12px; color: var(--gray-600); margin-top: 2px; line-height: 1.5; }
.activity-meta { font-size: 11px; color: var(--gray-400); margin-top: 4px; }

/* -- SLA BADGE -- */
.sla-badge { display: inline-flex; align-items: center; gap: 6px; background: #DCFCE7; border: 1px solid #BBF7D0; border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 700; color: #166534; }

/* -- RESPONSIVE -- */
@media (max-width: 768px) {
  .section { padding: 16px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pipeline-stages { grid-template-columns: 1fr; }
  .dash-row { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

#app-content { display: none; }

/* -- MODAL -- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: var(--radius); padding: 28px; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-title { font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 800; margin-bottom: 20px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray-400); }

/* -- BATTLE CARDS -- */
.bc-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.bc-header { padding: 16px 20px; cursor: pointer; display: flex; align-items: center; gap: 14px; transition: background 0.15s; }
.bc-header:hover { background: var(--gray-50); }
.bc-logo { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 18px; color: #fff; flex-shrink: 0; }
.bc-header-text { flex: 1; }
.bc-header-text h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.bc-header-text p { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.bc-toggle { font-size: 18px; color: var(--gray-400); transition: transform 0.2s; flex-shrink: 0; }
.bc-toggle.open { transform: rotate(180deg); }
.bc-body { display: none; padding: 0 20px 20px; }
.bc-body.open { display: block; }
.bc-section { margin-bottom: 16px; }
.bc-section-title { font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.bc-comparison { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 16px; }
.bc-comparison th { text-align: left; font-size: 10px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 10px; border-bottom: 2px solid var(--gray-100); }
.bc-comparison td { padding: 8px 10px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.bc-comparison td:first-child { font-weight: 600; color: var(--gray-800); }
.bc-bullet { font-size: 13px; color: var(--gray-700); line-height: 1.7; padding-left: 16px; position: relative; }
.bc-bullet::before { content: '\2022'; position: absolute; left: 0; color: var(--blue); font-weight: 700; }
.bc-quote { background: var(--gray-50); border-left: 3px solid var(--gray-300); padding: 10px 14px; font-size: 13px; color: var(--gray-600); font-style: italic; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 12px; }
.bc-knockout { background: var(--blue-light); border: 1.5px solid #B5D4F4; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; color: #185FA5; font-weight: 600; line-height: 1.5; }

/* -- EMAIL TEMPLATES -- */
.tpl-categories { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tpl-cat-btn { font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--gray-200); background: var(--white); cursor: pointer; transition: all 0.15s; font-family: 'Inter', sans-serif; color: var(--gray-700); }
.tpl-cat-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.tpl-cat-btn:hover { border-color: var(--blue); }
.tpl-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.tpl-preview { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.tpl-subject { font-size: 14px; font-weight: 600; color: var(--gray-900); padding-bottom: 12px; border-bottom: 1px solid var(--gray-100); margin-bottom: 16px; }
.tpl-body-preview { font-size: 13px; color: var(--gray-700); line-height: 1.8; white-space: pre-wrap; }
.tpl-copy-btn { margin-top: 16px; }

/* -- OBJECTION HANDLER -- */
.obj-search { margin-bottom: 20px; }
.obj-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
.obj-header { padding: 14px 20px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: background 0.15s; }
.obj-header:hover { background: var(--gray-50); }
.obj-number { width: 28px; height: 28px; border-radius: 50%; background: var(--blue-light); color: var(--blue); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.obj-header h3 { flex: 1; font-size: 14px; font-weight: 600; color: var(--gray-900); font-family: 'Inter', sans-serif; }
.obj-body { display: none; padding: 0 20px 20px; }
.obj-body.open { display: block; }
.obj-subsection { margin-bottom: 14px; }
.obj-subsection-title { font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.obj-response { background: var(--blue-light); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13px; color: #185FA5; line-height: 1.7; }
.obj-data-point { display: inline-flex; align-items: center; gap: 4px; background: #DCFCE7; color: #166534; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px; margin: 2px 4px 2px 0; }
.obj-followup { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; color: #92400E; line-height: 1.5; font-style: italic; }

/* -- REVENUE FORECASTING -- */
.forecast-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.forecast-kpi { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.forecast-kpi .kpi-label { font-size: 11px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.forecast-kpi .kpi-value { font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 800; }
.forecast-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.forecast-table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px; border-bottom: 2px solid var(--gray-100); }
.forecast-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); color: var(--gray-800); }
@media (max-width: 768px) { .forecast-kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .forecast-kpis { grid-template-columns: 1fr; } }

/* -- DEAL DETAIL MODAL -- */
.deal-detail-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 300; align-items: center; justify-content: center; }
.deal-detail-overlay.open { display: flex; }
.deal-detail-modal { background: var(--white); border-radius: var(--radius); width: 90%; max-width: 640px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.deal-detail-header { padding: 24px 24px 16px; border-bottom: 1px solid var(--gray-100); }
.deal-detail-header h2 { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.deal-detail-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--gray-600); margin-top: 8px; }
.deal-detail-meta span { display: flex; align-items: center; gap: 4px; }
.deal-detail-body { padding: 20px 24px; }
.deal-timeline { position: relative; padding-left: 24px; }
.deal-timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--gray-100); }
.deal-note-item { position: relative; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--gray-100); }
.deal-note-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.deal-note-dot { position: absolute; left: -20px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--white); }
.deal-note-dot.call { background: #2563EB; }
.deal-note-dot.email { background: #E91E8C; }
.deal-note-dot.meeting { background: #10B981; }
.deal-note-dot.note { background: #F59E0B; }
.deal-note-dot.stage-change { background: #6366F1; }
.deal-note-text { font-size: 13px; color: var(--gray-800); line-height: 1.6; }
.deal-note-meta { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.deal-add-note { padding: 20px 24px; border-top: 1px solid var(--gray-100); }
.deal-add-note h4 { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 10px; }

/* -- COLLATERAL LIBRARY -- */
.coll-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.coll-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); transition: box-shadow 0.15s; display: flex; flex-direction: column; }
.coll-card:hover { box-shadow: var(--shadow-md); }
.coll-card-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.coll-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0; }
.coll-icon.pdf { background: #EF4444; }
.coll-icon.pptx { background: #F59E0B; }
.coll-icon.video { background: #6366F1; }
.coll-icon.link { background: #0891B2; }
.coll-icon.doc { background: #2B5A8E; }
.coll-card-info { flex: 1; }
.coll-card-info h4 { font-size: 14px; font-weight: 600; color: var(--gray-900); margin-bottom: 4px; }
.coll-card-info p { font-size: 12px; color: var(--gray-600); line-height: 1.5; }
.coll-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--gray-100); }
