/* =========================================================
   VIHAN CRM V10.2 - COMMERCIAL TYPOGRAPHY SYSTEM
   Final typography layer. Loaded AFTER crm.css + crm-production.css.
   No font files are bundled. Uses local OpenAI Sans when available,
   then Arial / system sans-serif fallback.
   ========================================================= */

:root{
  --font:"OpenAI Sans",Arial,"Segoe UI",Roboto,Helvetica,sans-serif;
  --font-ui:"OpenAI Sans",Arial,"Segoe UI",Roboto,Helvetica,sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  --type-body:16px;
  --type-body-lh:26px;
  --type-ui:14px;
  --type-ui-lh:20px;
  --type-meta:12.5px;
  --type-meta-lh:18px;
  --type-table:14px;
  --type-table-lh:22px;
  --type-h1:30px;
  --type-h1-lh:38px;
  --type-h2:22px;
  --type-h2-lh:30px;
  --type-h3:18px;
  --type-h3-lh:26px;
}

@font-face{
  font-family:"OpenAI Sans";
  src:local("OpenAI Sans");
  font-display:swap;
}

html{font-size:16px!important;text-size-adjust:100%;-webkit-text-size-adjust:100%}
body,body.crm-v7,body.crm-v6{
  font-family:var(--font)!important;
  font-size:var(--type-body)!important;
  line-height:var(--type-body-lh)!important;
  font-weight:400;
  letter-spacing:0;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
button,input,select,textarea{font-family:var(--font-ui)!important}
b,strong{font-weight:600!important}

/* ---------- Headings ---------- */
.app-content h1,.page-head h1,.workspace-heading h1,.login h1{
  font-size:var(--type-h1)!important;
  line-height:var(--type-h1-lh)!important;
  font-weight:600!important;
  letter-spacing:-.025em!important;
}
.app-content h2,.card h2,.section-title h2{
  font-size:var(--type-h2)!important;
  line-height:var(--type-h2-lh)!important;
  font-weight:600!important;
  letter-spacing:-.015em!important;
}
.app-content h3,.card h3,.modal-card h3,.bot-card h3,.context-block h3,.source-add-card h3{
  font-size:var(--type-h3)!important;
  line-height:var(--type-h3-lh)!important;
  font-weight:600!important;
  letter-spacing:-.008em!important;
}

/* ---------- Main readable content ---------- */
.app-content{
  font-size:var(--type-body)!important;
  line-height:var(--type-body-lh)!important;
}
.app-content p,.app-content li,.app-content blockquote,
.page-head p,.workspace-heading p,.customer-summary,.lead-summary,.detail-copy{
  font-size:var(--type-body)!important;
  line-height:var(--type-body-lh)!important;
  font-weight:400!important;
}

/* ---------- Header ---------- */
.app-brand-text b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.app-brand-text small{font-size:12px!important;line-height:18px!important;font-weight:400!important;letter-spacing:.05em!important}
.app-search{height:42px!important}
.app-search input{font-size:15px!important;line-height:24px!important;font-weight:400!important}
.app-search kbd{font-size:12px!important;line-height:18px!important;font-weight:400!important}
.user-copy b,.user-menu-profile b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.user-copy small,.user-menu-profile small{font-size:12px!important;line-height:18px!important;font-weight:400!important}
.notification-menu-head b{font-size:16px!important;line-height:24px!important;font-weight:600!important}
.notification-menu-head small{font-size:12px!important;line-height:18px!important}
.notification-item b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.notification-item span{font-size:13px!important;line-height:20px!important}
.notification-item small{font-size:12px!important;line-height:18px!important}
.notification-count{font-size:11px!important;line-height:16px!important;font-weight:600!important}

/* ---------- Sidebar & navigation ---------- */
.nav-caption,.context-label{
  font-size:12px!important;
  line-height:18px!important;
  font-weight:600!important;
  letter-spacing:.055em!important;
}
.app-nav-link,.sidebar-more>summary,.sidebar-more-links a,.sidebar-context a,.logout-link{
  font-size:14px!important;
  line-height:20px!important;
  font-weight:500!important;
}
.app-nav-link.active,.sidebar-more-links a.active{font-weight:600!important}
.app-nav-link{min-height:44px!important}
.sidebar-more>summary{min-height:44px!important}
.mobile-bottom-nav a{font-size:12px!important;line-height:16px!important;font-weight:500!important}

/* ---------- Buttons / menus ---------- */
.btn,.quick-create summary,.user-account-dropdown>a,.admin-tabs a,.kb-tabs a,
.inbox-status-strip>a,.pagination a,.followup-presets button,.quick button{
  font-size:14px!important;
  line-height:20px!important;
  font-weight:500!important;
}
.btn{min-height:40px!important;padding-left:14px!important;padding-right:14px!important}
.btn.sm{min-height:36px!important;font-size:14px!important}
.btn.xs{min-height:32px!important;font-size:13px!important;line-height:18px!important}
.btn.blue,.btn.green,.btn.red,.btn.orange,.quick-create summary{font-weight:600!important}
.quick-create-menu b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.quick-create-menu small{font-size:12px!important;line-height:18px!important}

/* ---------- Forms ---------- */
.field label,.composer label,.modal-card label,.quick-form label,.login label{
  font-size:14px!important;
  line-height:20px!important;
  font-weight:600!important;
  letter-spacing:0!important;
}
.field input,.field select,.field textarea,.quick-form input,.quick-form select,.quick-form textarea,
.filters input,.filters select,.hub-filters input,.hub-filters select,.lead-filters input,.lead-filters select,
.segment-filters input,.segment-filters select,.crm-search-form input,.crm-search-form select,
.source-add-card input,.source-add-card textarea,.source-add-card select,
.chat-reply-v10 textarea,.login input{
  font-size:15px!important;
  line-height:24px!important;
  font-weight:400!important;
}
input::placeholder,textarea::placeholder{font-weight:400!important;opacity:1;color:#98a2b3}
.field .help,.help,.form-help,.workflow-note,.dedupe-live{
  font-size:13px!important;
  line-height:20px!important;
  font-weight:400!important;
}
.checkline,.switchline,.filter-check{font-size:14px!important;line-height:20px!important;font-weight:500!important}
.deal-stage-select,.lost-reason-field,.close-note-field{font-size:14px!important;line-height:20px!important;min-height:36px!important}
#contacts .quick-form label{font-size:14px!important;line-height:20px!important}

/* ---------- Cards / descriptive metadata ---------- */
.card-sub,.muted,.mini-item-foot,.mini-item p,.compact-empty small,.empty,.live-empty,
.source-main span,.source-main a,.source-main small,.breadcrumbs,.kpi .trend,
.context-block p,.context-link span,.need-box p,.lead-linked-customer{
  font-size:var(--type-meta)!important;
  line-height:var(--type-meta-lh)!important;
  font-weight:400!important;
}
.card-head{line-height:normal}

/* ---------- KPI / metrics ---------- */
.kpi small,.metric small,.segment-metrics small,.admin-lead-kpis small{
  font-size:13px!important;
  line-height:18px!important;
  font-weight:500!important;
}
.kpi strong,.metric strong,.segment-metrics strong,.admin-lead-kpis strong{
  font-size:28px!important;
  line-height:34px!important;
  font-weight:600!important;
  letter-spacing:-.025em!important;
}
.score-badge{font-size:13px!important;line-height:18px!important;font-weight:600!important;min-width:40px!important;height:30px!important}

/* ---------- Tables / dense CRM lists ---------- */
.table-wrap table,.data-table,.admin-table,.crm-table{font-size:var(--type-table)!important;line-height:var(--type-table-lh)!important}
table th,.data-table th,.admin-table th,.crm-table th{
  font-size:12px!important;
  line-height:18px!important;
  font-weight:600!important;
  letter-spacing:.035em!important;
}
table td,.data-table td,.admin-table td,.crm-table td{
  font-size:var(--type-table)!important;
  line-height:var(--type-table-lh)!important;
  font-weight:400!important;
}
table td b,table td strong{font-weight:600!important}

/* Hub / customer / lead rows */
.hub-row b,.lead-row b,.customer-row b,.admin-lead-main>a,.source-main b,.live-conv b{
  font-size:15px!important;
  line-height:22px!important;
  font-weight:600!important;
}
.hub-row span,.lead-row span,.customer-row span,.admin-lead-main>span,.admin-lead-owner>span,
.live-conv small,.live-conv-meta time{
  font-size:12.5px!important;
  line-height:18px!important;
}

/* ---------- Badges / status / chips ---------- */
.badge,.lead-admin-status,.source-status,.stale-badge,.status-pill,.pipeline-stage-label{
  font-size:12px!important;
  line-height:18px!important;
  font-weight:600!important;
}
.badge{min-height:26px!important;padding-left:8px!important;padding-right:8px!important}

/* ---------- Customer 360 / Lead detail / Timeline ---------- */
.customer-hero h1,.lead-detail-hero h1,.lead-hero h1{font-size:28px!important;line-height:36px!important;font-weight:600!important}
.customer-hero p,.lead-detail-hero p,.lead-hero p{font-size:14px!important;line-height:22px!important}
.activity-item,.timeline-item,.task-row,.mini-item{
  font-size:14px!important;
  line-height:22px!important;
}
.activity-item b,.timeline-item b,.task-row b,.mini-item b{font-size:14px!important;line-height:22px!important;font-weight:600!important}
.activity-item small,.timeline-item small,.task-row small,.mini-item small{font-size:12.5px!important;line-height:18px!important}

/* ---------- Pipeline / Tasks / Calendar ---------- */
.pipeline-column h3,.kanban-column h3{font-size:16px!important;line-height:24px!important;font-weight:600!important}
.deal-card,.kanban-card,.task-card,.calendar-event{font-size:14px!important;line-height:22px!important}
.deal-card b,.kanban-card b,.task-card b{font-size:14px!important;line-height:22px!important;font-weight:600!important}
.calendar-day-head,.calendar-weekday{font-size:12px!important;line-height:18px!important;font-weight:600!important}

/* ---------- Chatbot Admin / Live Inbox ---------- */
.bot-card h3{font-size:18px!important;line-height:26px!important;font-weight:600!important}
.bot-stats,.agent-list label,.inbox-status-strip select{font-size:14px!important;line-height:20px!important}
.live-thread-head b{font-size:18px!important;line-height:26px!important;font-weight:600!important}
.live-thread-head span{font-size:13px!important;line-height:20px!important}
.live-conv p{font-size:14px!important;line-height:22px!important}
.crm-chat-msg,.chat-thread-messages .msg,.chat-thread-messages .crm-chat-msg{
  font-size:16px!important;
  line-height:26px!important;
  font-weight:400!important;
}
.crm-citations strong,.crm-citations a,.crm-citations span{font-size:12px!important;line-height:18px!important}
.context-block>small,.context-block dt{font-size:12px!important;line-height:18px!important}
.context-block dd{font-size:13px!important;line-height:20px!important}
.context-link b,.need-box b,.source-page{font-size:14px!important;line-height:20px!important;font-weight:600!important}

/* ---------- Modals / notifications / validation ---------- */
.modal-card p,.delete-customer-summary,.delete-impact-grid span,.lead-converted-warning{
  font-size:14px!important;
  line-height:22px!important;
}
.flash,.alert{
  font-size:14px!important;
  line-height:22px!important;
  font-weight:400!important;
}
.flash b,.alert b{font-weight:600!important}

/* ---------- Code ---------- */
code,pre,.code,textarea.embed-code{
  font-family:var(--font-mono)!important;
  font-size:14px!important;
  line-height:21px!important;
  font-weight:400!important;
}

/* ---------- Login ---------- */
.login-layout,.login-layout *{font-family:var(--font)!important}
.login-brand-panel h2{font-size:36px!important;line-height:44px!important;font-weight:600!important;letter-spacing:-.025em!important}
.login-brand-panel p{font-size:16px!important;line-height:26px!important;font-weight:400!important}
.login-brand-points b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.login-brand-points span{font-size:13px!important;line-height:20px!important;font-weight:400!important}
.login .ver{font-size:12px!important;line-height:18px!important;font-weight:600!important}
.login .sub{font-size:16px!important;line-height:26px!important}
.login .btn{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.login .err{font-size:14px!important;line-height:22px!important}
.login .links,.login .links a{font-size:13px!important;line-height:20px!important;font-weight:500!important}

/* ---------- Standalone installer / upgrade pages ---------- */
body:not(.crm-v7):not(.crm-v6){font-family:var(--font)!important;font-size:16px;line-height:26px}
body:not(.crm-v7):not(.crm-v6) h1{font-size:30px;line-height:38px;font-weight:600}
body:not(.crm-v7):not(.crm-v6) h2{font-size:22px;line-height:30px;font-weight:600}
body:not(.crm-v7):not(.crm-v6) label{font-size:14px;line-height:20px;font-weight:600}
body:not(.crm-v7):not(.crm-v6) input,body:not(.crm-v7):not(.crm-v6) select,body:not(.crm-v7):not(.crm-v6) textarea{font-size:15px;line-height:24px}
body:not(.crm-v7):not(.crm-v6) small{font-size:13px;line-height:20px}

/* ---------- Responsive ---------- */
@media(max-width:900px){
  .app-content{font-size:15.5px!important;line-height:25px!important}
  .page-head h1,.workspace-heading h1{font-size:28px!important;line-height:36px!important}
  .card h2{font-size:21px!important;line-height:29px!important}
  .app-search input{font-size:15px!important}
}
@media(max-width:640px){
  html{font-size:16px!important}
  body,body.crm-v7,body.crm-v6{font-size:15px!important;line-height:24px!important}
  .app-content{font-size:15px!important;line-height:24px!important}
  .page-head h1,.workspace-heading h1{font-size:26px!important;line-height:34px!important}
  .card h2{font-size:20px!important;line-height:28px!important}
  .card h3{font-size:17px!important;line-height:25px!important}
  .field input,.field select,.field textarea,.quick-form input,.quick-form select,.quick-form textarea{font-size:16px!important;line-height:24px!important}
  .mobile-bottom-nav a{font-size:11.5px!important;line-height:16px!important}
}

/* ---------- Legacy CRM component coverage ---------- */
.company-link{font-size:15px!important;line-height:22px!important;font-weight:600!important}
.crm-stage-flow div b,.crm-flow div b{font-size:12px!important;line-height:18px!important;font-weight:600!important}
.crm-stage-flow div span,.crm-flow div span{font-size:13px!important;line-height:18px!important;font-weight:600!important}
.crm-stage-flow i{font-size:14px!important;line-height:20px!important}
.crm-flow div small,.pipe-mini small,.pipe-mini .money{font-size:12px!important;line-height:18px!important}
.customer-meta{font-size:13px!important;line-height:20px!important}
.score-circle{font-size:14px!important;font-weight:600!important}
.score-text small{font-size:12px!important;line-height:18px!important}
.score-text b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.section-tabs a{font-size:14px!important;line-height:20px!important;font-weight:500!important}
.info-row small{font-size:12px!important;line-height:18px!important}
.info-row b,.info-row span,.info-row a{font-size:14px!important;line-height:22px!important}
.task-check button{font-size:14px!important;line-height:20px!important}
.task-title{font-size:14px!important;line-height:22px!important;font-weight:600!important}
.task-meta{font-size:12.5px!important;line-height:18px!important}
.task-priority{font-size:12px!important;line-height:18px!important;font-weight:600!important}
.activity-icon{font-size:14px!important}
.activity-head{font-size:13px!important;line-height:20px!important}
.activity-body p{font-size:14px!important;line-height:22px!important}
.activity-result{font-size:12.5px!important;line-height:18px!important}
.tag-chip{font-size:12px!important;line-height:18px!important;font-weight:500!important}
.segment-metrics small{font-size:12px!important;line-height:18px!important}
.segment-metrics b{font-size:16px!important;line-height:24px!important;font-weight:600!important}
.attachment-form small{font-size:12.5px!important;line-height:18px!important}
.file-row b{font-size:14px!important;line-height:22px!important;font-weight:600!important}
.file-row span{font-size:12.5px!important;line-height:18px!important}
.kanban-head{font-size:13px!important;line-height:20px!important;font-weight:600!important}
.kanban-total{font-size:12px!important;line-height:18px!important}
.deal-card>b{font-size:14px!important;line-height:22px!important;font-weight:600!important}
.deal-company,.deal-foot,.kanban-help{font-size:12.5px!important;line-height:18px!important}
.search-type,.dup-key{font-size:12px!important;line-height:18px!important;font-weight:600!important}
.search-results b,.search-results strong{font-size:14px!important;line-height:22px!important;font-weight:600!important}
.search-results small{font-size:12px!important;line-height:18px!important}
.duplicate-warning,.v3-alert{font-size:13px!important;line-height:20px!important}
.dup-cards b{font-size:13px!important;line-height:20px!important;font-weight:600!important}
.dup-cards span{font-size:12px!important;line-height:18px!important}
.report-bar div{font-size:13px!important;line-height:20px!important}
.hub-summary span{font-size:12.5px!important;line-height:18px!important}
.filter-check{font-size:13px!important;line-height:20px!important}
.stale-badge{font-size:12px!important;line-height:18px!important;font-weight:600!important}
.modal-card p{font-size:14px!important;line-height:22px!important}
.logo-form input{font-size:14px!important;line-height:20px!important}
.permission-simple b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.permission-simple span{font-size:13px!important;line-height:20px!important}

/* ---------- Customer 360 later-version components ---------- */
.customer-score-compact span,.customer-kpi-strip small,.customer-kpi-strip span,.customer-stale-note,
.contact-line span,#deals .mini-item-foot{font-size:12.5px!important;line-height:18px!important}
.link-button,.customer-tools summary,.customer-tools a{font-size:14px!important;line-height:20px!important;font-weight:500!important}

/* ---------- Hub V7.4+ / production list ---------- */
.hub-summary-v74 small,.hub-kpi small,.hub-kpi span,.hub-contact-extra,.contact-count,
.hub-list-head span,.hub-commercial-header,.hub-cell small,.hub-record-meta,.hub-contact .hub-email,
.hub-contact-count,.hub-secondary-contact,.hub-status,.hub-inline-alert,.hub-owner-copy small{
  font-size:12px!important;line-height:18px!important
}
.hub-list-head a,.hub-cell a,.hub-owner b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.hub-more-menu label{font-size:14px!important;line-height:20px!important;font-weight:500!important}
.hub-owner-avatar{font-size:12px!important;font-weight:600!important}
.hub-cell:before{font-size:11px!important;line-height:16px!important}

/* ---------- Admin customer / lead management ---------- */
.admin-customer-kpis small,.admin-customer-kpis span,.admin-lead-kpis small,.admin-lead-kpis span{
  font-size:12.5px!important;line-height:18px!important
}
.admin-customer-head,.admin-lead-head{font-size:12px!important;line-height:18px!important;font-weight:600!important}
.admin-customer-main>span,.admin-customer-row>div>span,.admin-lead-main>span,.admin-lead-row small,.admin-lead-owner>span{
  font-size:12.5px!important;line-height:18px!important
}
.owner-inline-form select{font-size:14px!important;line-height:20px!important}
.delete-customer-summary span,.delete-impact-grid span,.transfer-popover small,.lead-delete-impact span{
  font-size:12.5px!important;line-height:18px!important
}
.transfer-popover label,.lead-reopen-popover label{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.lead-converted-warning,.lead-reopen-popover p{font-size:14px!important;line-height:22px!important}

/* ---------- Daily Sales / Notification / Calendar ---------- */
.today-command-head p,.today-zero span,.daily-copy span{font-size:14px!important;line-height:22px!important}
.today-eyebrow,.daily-kind,.section-eyebrow,.workspace-kicker{font-size:12px!important;line-height:18px!important;font-weight:600!important}
.today-stats span,.daily-summary span,.today-work-state,.today-command-foot a,.daily-state,.daily-command-foot{
  font-size:12.5px!important;line-height:18px!important
}
.today-work-copy span{font-size:13px!important;line-height:20px!important}
.today-work-icon{font-size:14px!important}
.quick-action-title span,.quick-action-popover label{font-size:13px!important;line-height:20px!important}
.calendar-toolbar span,.calendar-weekdays span,.calendar-date span{font-size:12px!important;line-height:18px!important}
.calendar-date b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.calendar-event time,.calendar-event span{font-size:12px!important;line-height:18px!important}
.calendar-event b{font-size:13px!important;line-height:20px!important;font-weight:600!important}
.calendar-more{font-size:12px!important;line-height:18px!important;font-weight:500!important}
.bulk-assign-bar b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.bulk-assign-bar span{font-size:13px!important;line-height:20px!important}
.bulk-assign-bar select{font-size:14px!important;line-height:20px!important}
.calendar-toolbar .btn{font-size:14px!important;line-height:20px!important}

/* ---------- Dashboard production ---------- */
.daily-summary span,.metric-label,.metric-card small,.pipeline-stage-item small,.sleeping-list small,.sleeping-list strong,
.performance-table th,.perf-user i{font-size:12.5px!important;line-height:18px!important}
.metric-label,.performance-table th{font-weight:600!important}

/* ---------- Lead Intake / Lead Detail V8.6+ ---------- */
.lead-intake-breadcrumb,.lead-detail-breadcrumb{font-size:13px!important;line-height:20px!important}
.lead-intake-eyebrow,.lead-detail-kicker,.lead-section-number{font-size:12px!important;line-height:18px!important;font-weight:600!important}
.lead-intake-progress>div span,.lead-form-card-head p,.lead-side-title p,.lead-side-card .help,
.lead-followup-note span,.lead-create-checklist p,.lead-reopen-popover p,.lead-closed-banner span,
.lead-detail-kpis small,.lead-detail-kpis span,.lead-task-item div>span,.activity-next,.lead-danger-zone p,
.lead-linked-card p,.lead-next-card p,.lead-next-card>span{
  font-size:13px!important;line-height:20px!important
}
.lead-intake-progress>div small,.lead-create-checklist>div span{font-size:12px!important;line-height:18px!important}
.lead-name-error{font-size:13px!important;line-height:20px!important}
.lead-followup-presets button{font-size:13px!important;line-height:20px!important;font-weight:500!important}
.lead-followup-note b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.lead-status-pill,.lead-priority-pill,.lead-owner-pill,.lead-warning-pill{font-size:12px!important;line-height:18px!important;font-weight:600!important}
.lead-detail-tabs a{font-size:14px!important;line-height:20px!important;font-weight:500!important}
.lead-close-form select,.lead-close-form input{font-size:15px!important;line-height:24px!important}

/* ---------- Chat legacy + V10 Live Inbox ---------- */
.chat-list-item p{font-size:14px!important;line-height:22px!important}
.chat-list-item small,.chat-status,.chat-thread-head span,.crm-chat-msg small,.faq-row small,.bot-card small,
.agent-list small{font-size:12px!important;line-height:18px!important}
.crm-chat-msg b,.faq-row b,.mini-info b{font-size:14px!important;line-height:20px!important;font-weight:600!important}
.crm-chat-msg p{font-size:16px!important;line-height:26px!important}
.embed-code{font-size:14px!important;line-height:21px!important}
.faq-row p,.mini-info p{font-size:13px!important;line-height:20px!important}
.source-add-card p,.source-main span,.source-main a,.source-main small,.live-conv small,.live-conv-meta time,
.live-thread-head span,.context-block p,.context-link span,.context-block dt,.context-block dd{
  font-size:12.5px!important;line-height:18px!important
}
.source-add-card input,.source-add-card textarea{font-size:15px!important;line-height:24px!important}
.source-main b{font-size:14px!important;line-height:22px!important;font-weight:600!important}
.source-status,.crm-citations strong,.crm-citations a,.crm-citations span,.context-block>small{font-size:12px!important;line-height:18px!important}
.context-link b,.need-box b,.source-page{font-size:14px!important;line-height:20px!important;font-weight:600!important}
