html, body {
  font-size: 100% !important;
  zoom: 1 !important;
}

    html { font-size: 100%; }
    body { background:#e2e8f0; }
    .scrollbar-thin::-webkit-scrollbar { width: 8px; height:8px; }
    .scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(148,163,184,.55); border-radius: 999px; }
    .action-btn{position:relative;display:inline-flex;height:42px;width:42px;align-items:center;justify-content:center;border-radius:12px;border:1px solid #e2e8f0;background:#fff;color:#475569;transition:.15s;flex:0 0 42px}
    .action-btn svg{width:18px;height:18px}
    .action-groups{display:flex;justify-content:flex-end;align-items:center;gap:18px;flex-wrap:wrap;padding-top:4px}
    .action-group{display:flex;gap:8px;align-items:center}
    .action-btn:hover{background:#f8fafc;border-color:#cbd5e1}
    .action-btn.primary{background:#84cc16;color:#fff;border-color:#84cc16}
    .action-btn.primary:hover{background:#65a30d;border-color:#65a30d}
    .action-btn .tip{position:absolute;left:50%;top:-34px;transform:translateX(-50%);white-space:nowrap;border-radius:8px;background:#0f172a;padding:4px 8px;font-size:11px;color:#fff;opacity:0;transition:opacity .15s;z-index:4}
    .action-btn:hover .tip{opacity:1}
    /* Selected contact only: stack by panel width, not screen width */
    #selectedContactPanel .panel-body > .grid{
      display:grid;
      grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);
      gap:20px;
      align-items:start;
    }
    #selectedContactPanel .panel-body > .grid > :first-child,
    #selectedContactPanel .panel-body > .grid > :last-child{
      min-width:0;
    }
    #selectedContactPanel .scenario-picker-wrap,
    #selectedContactPanel .scenario-picker-btn{
      width:100%;
    }
    #selectedContactPanel .action-groups{
      justify-content:flex-end;
      padding-top:0;
    }
    #selectedContactPanel.sc-stacked .panel-body > .grid{
      grid-template-columns:1fr;
      gap:12px;
    }
    #selectedContactPanel.sc-stacked .panel-body > .grid > :last-child{
      display:flex;
      flex-direction:column;
      gap:12px;
    }
    #selectedContactPanel.sc-stacked .action-groups{
      justify-content:flex-start;
      width:100%;
    }
    #selectedContactPanel.sc-stacked .action-group{
      flex-wrap:wrap;
    }


    .history-event-card{padding:10px 10px 0 10px;background:transparent;box-shadow:none;transition:none;border:none;border-radius:0}
.history-event-card + .history-event-card{border-top:1px solid #e2e8f0}
.history-event-card:hover{background:transparent}
    .history-event-head{display:block;margin-bottom:6px}
    .history-event-type{display:block;min-width:0}
    .history-event-icon{width:28px;height:28px;border-radius:10px;background:#f8fafc;border:1px solid #dbe3ee;display:flex;align-items:center;justify-content:center;font-size:14px;flex:0 0 auto;margin-top:2px}
    .history-event-title{font-size:14px;font-weight:700;color:#0f172a;line-height:1.2}
    .history-event-meta{font-size:12px;color:#94a3b8;line-height:1.35;margin-top:2px}
    .history-event-tag{float:right;margin-left:12px;margin-bottom:6px;padding:0;background:transparent;border:none;border-radius:0;font-size:12px;line-height:1.15;color:#334155;text-align:right}
    .history-event-tag span{display:block}
.history-event-tag span:last-child{font-size:11px;color:#64748b}
    .history-event-body{font-size:14px;line-height:1.55;color:#334155;padding-left:0}
    .history-event-list{margin:8px 0 0 18px;padding:0;color:#475569;font-size:13px}
    .history-link-btn{margin-top:8px;border:none;background:none;padding:0;color:#1d4ed8;font-size:13px;font-weight:600;cursor:pointer}
    .history-link-btn:hover{text-decoration:underline}
    .history-modal{position:fixed;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;padding:24px}
    .history-modal.hidden{display:none}
    .history-modal-backdrop{inset:0;background:rgba(15,23,42,.42)}
    .history-modal-card{position:relative;z-index:1;width:min(760px,100%);max-height:calc(100vh - 48px);overflow:auto;background:#fff;border-radius:24px;box-shadow:0 24px 70px rgba(15,23,42,.18)}
    .history-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid #e2e8f0}
    .history-modal-title{font-size:18px;font-weight:700;color:#0f172a}
    .history-modal-meta{font-size:13px;color:#94a3b8;margin-top:4px}
    .history-modal-close{width:36px;height:36px;border:none;border-radius:12px;background:#f8fafc;font-size:22px;line-height:1;cursor:pointer}
    .history-modal-body{padding:24px}
    .history-event-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
    .history-event-pane{border:1px solid #e2e8f0;border-radius:18px;padding:16px;background:#fff}
    .history-event-pane-label{font-size:12px;color:#94a3b8;text-transform:uppercase;letter-spacing:.04em;margin-bottom:8px}
    .history-event-pane-title{font-size:14px;line-height:1.6;color:#0f172a;font-weight:600;white-space:pre-wrap}
    @media (max-width: 760px){.history-event-grid{grid-template-columns:1fr}}

    .workspace{position:relative;height:calc(100vh - 170px);min-height:1120px;border-radius:28px}
    .panel{position:absolute;background:#fff;border:1px solid #dbe3ee;border-radius:24px;box-shadow:0 10px 25px rgba(15,23,42,.08);overflow:hidden;resize:both;min-width:260px;min-height:110px}
    .panel.hidden-panel{display:none}
    .panel.minimized{height:auto !important;resize:none}
    .panel.minimized .panel-body{display:none}
    .panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;border-bottom:1px solid #edf2f7;background:#fff;cursor:move;user-select:none}
    .panel-title{display:flex;align-items:center;gap:10px;font-weight:700;color:#1e293b}
    .panel-title svg{color:#22c55e}
    .panel-actions{display:flex;gap:6px}
    .panel-icon-btn{width:28px;height:28px;border-radius:10px;border:none;background:transparent;color:#94a3b8;display:flex;align-items:center;justify-content:center;box-shadow:none;}
    .panel-icon-btn:hover{background: transparent;color:#334155}
    .panel-body{height:calc(100% - 58px);overflow:visible;padding:16px}
    #contactsPanel .panel-body{display:flex;flex-direction:column;overflow:hidden;}
    #resultPanel .panel-body{overflow-y:auto;overflow-x:hidden;padding-right:10px;}
    #callHistoryPanel .panel-body{overflow-y:auto;overflow-x:hidden;padding-right:10px}
    #callHistoryPanel .panel-body::-webkit-scrollbar{width:8px}
    #callHistoryPanel .panel-body::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}
    #callHistoryPanel .panel-body::-webkit-scrollbar-track{background:transparent}
    #resultPanel .panel-body::-webkit-scrollbar{width:8px}
    #resultPanel .panel-body::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}
    #resultPanel .panel-body::-webkit-scrollbar-track{background:transparent}
    #whatYouSayPanel{display:flex;flex-direction:column}
    #whatYouSayPanel .panel-body{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:10px;
  padding-bottom:4px;
}
    #whatYouSayPanel .panel-body::-webkit-scrollbar{width:8px}
    #whatYouSayPanel .panel-body::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}
    #whatYouSayPanel .panel-body::-webkit-scrollbar-track{background:transparent}
    #quickNotesPanel{display:flex;flex-direction:column}
    #quickNotesPanel .panel-body{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:6px 10px 2px 10px;
}
    #quickNotesPanel .panel-body::-webkit-scrollbar{width:8px}
    #quickNotesPanel .panel-body::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}
    #quickNotesPanel .panel-body::-webkit-scrollbar-track{background:transparent}
    #whatYouSayPanel .panel-footer,
    #quickNotesPanel .panel-footer{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  padding:4px 8px;
  padding-right:23px;
  min-height:40px;
  border-top:1px solid #e2e8f0;
  background:#fff;
  border-bottom-left-radius:28px;
  border-bottom-right-radius:28px;
}
    #saveWhatYouSayBtn,
    #quickNotesSaveBtn{
  border-radius:10px;
  background:#84cc16;
  padding:4px 10px;
  font-size:12px;
  font-weight:600;
  color:#fff;
  line-height:1.2;
  height:26px;
}
    #saveWhatYouSayBtn:hover,
    #quickNotesSaveBtn:hover{background:#65a30d}
    .panel-resize-hint{position:absolute;right:8px;bottom:5px;color:#cbd5e1;font-size:16px;line-height:1;pointer-events:none}
    body.sms-modal-open::before{display:none;content:none}
    #smsPanel.sms-modal{
      position:fixed !important;
      
      min-width:760px;
      min-height:420px;
      max-width:1200px;
      max-height:560px;
      z-index:auto !important;
      resize:both;
      border-radius:28px;
      overflow:hidden;
      box-shadow:0 24px 70px rgba(15,23,42,.18);
    }
    #smsPanel.sms-modal .panel-header{
      cursor:move;
      padding:22px 24px 16px;
      align-items:flex-start;
    }
    #smsPanel.sms-modal .panel-title{align-items:flex-start}
    #smsPanel.sms-modal .panel-title .sms-title-wrap{display:flex;flex-direction:column;gap:4px}
    #smsPanel.sms-modal .panel-title .sms-subtitle{font-size:13px;font-weight:500;color:#94a3b8}
    #smsPanel.sms-modal .panel-body{
      height:calc(100% - 78px);
      padding:0;
      overflow:hidden;
    }
    #smsPanel.sms-modal .panel-actions{margin-left:auto}
    #smsPanel.sms-modal .panel-actions [data-minimize-panel="smsPanel"]{display:none}
    #smsPanel.sms-modal .panel-icon-btn{width:30px;height:30px;font-size:28px;line-height:1}
    #smsPanel.sms-modal .panel-resize-hint{display:block}
    .sms-modal-layout{
      display:grid;
      grid-template-columns:180px minmax(0,1fr);
      height:100%;
      border-top:1px solid #edf2f7;
    }
    .sms-template-column{
      background:#f8fafc;
      border-right:1px solid #edf2f7;
      padding:16px 12px;
    }
    .sms-template-heading{
      font-size:12px;
      font-weight:700;
      color:#94a3b8;
      margin-bottom:12px;
      text-transform:uppercase;
    }
    .sms-template-list{display:flex;flex-direction:column;gap:10px}
    .sms-template-btn{
      width:100%;
      text-align:left;
      border:1px solid #e2e8f0;
      background:#fff;
      border-radius:14px;
      padding:10px 12px;
      transition:.16s ease;
    }
    .sms-template-btn:hover{border-color:#cbd5e1;transform:translateY(-1px)}
    .sms-template-title{display:block;font-size:14px;font-weight:700;color:#334155;margin-bottom:0}
    .sms-template-desc{display:none}
    .sms-compose-area{
      padding:18px 22px 20px;
      display:grid;
      grid-template-rows:auto auto 1fr auto;
      gap:14px;
      min-width:0;
      height:100%;
    }
    .sms-field-label{
      font-size:13px;
      color:#94a3b8;
      margin-bottom:6px;
      display:block;
    }
    .sms-input,.sms-textarea{
      width:100%;
      border:1px solid #dbe3ee;
      border-radius:16px;
      background:#fff;
      color:#334155;
      outline:none;
    }
    .sms-input{padding:12px 14px;font-size:16px}
    .sms-textarea{
      padding:14px;
      font-size:15px;
      resize:none;
      min-height:220px;
      height:100%;
    }
    .sms-input:focus,.sms-textarea:focus{border-color:#84cc16}
    .sms-footer{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:16px;
      margin-top:4px;
    }
    .sms-counter{font-size:13px;color:#94a3b8}
    .sms-footer-actions{display:flex;gap:10px}
    #salesPanel .panel-body{padding:0;background:#f8fafc}
    .sales-sms-layout{display:grid;grid-template-columns:250px minmax(0,1fr);height:100%}
    .sales-sms-template-column{border-right:1px solid #e2e8f0;background:#f8fafc;padding:22px 18px 18px}
    .sales-sms-template-heading{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#94a3b8;margin-bottom:12px}
    .sales-sms-template-list{display:flex;flex-direction:column;gap:10px}
    .sales-sms-template-btn{width:100%;text-align:left;border:1px solid #cbd5e1;background:#fff;border-radius:20px;padding:14px 14px 13px;transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease}
    .sales-sms-template-btn:hover{border-color:#cbd5e1;transform:translateY(-1px);box-shadow:0 8px 18px rgba(15,23,42,.06)}
    .sales-sms-template-title{display:block;font-size:14px;font-weight:700;color:#334155;margin-bottom:6px}
    .sales-sms-template-desc{display:block;font-size:12px;line-height:1.45;color:#94a3b8}
    .sales-sms-compose-area{display:grid;grid-template-rows:auto auto 1fr auto;gap:14px;padding:22px 20px 18px;background:#fff;height:100%}
    @media (max-width: 1024px){.sales-sms-layout{grid-template-columns:1fr}.sales-sms-template-column{border-right:none;border-bottom:1px solid #e2e8f0}.sales-sms-template-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.sales-sms-compose-area{min-height:360px}}
    body.email-modal-open::after{display:none;content:none}
    #emailPanel.email-modal{
      position:fixed !important;
      
      min-width:820px;
      min-height:460px;
      max-width:1280px;
      max-height:640px;
      z-index:auto !important;
      resize:both;
      border-radius:28px;
      overflow:hidden;
      box-shadow:0 24px 70px rgba(15,23,42,.18);
      background:#fff;
    }
    #emailPanel.email-modal .panel-header{
      cursor:move;
      padding:22px 24px 16px;
      align-items:flex-start;
    }
    #emailPanel.email-modal .panel-title{align-items:flex-start}
    #emailPanel.email-modal .email-title-wrap{display:flex;flex-direction:column;gap:4px}
    #emailPanel.email-modal .email-subtitle{font-size:13px;font-weight:500;color:#94a3b8}
    #emailPanel.email-modal .panel-body{
      height:calc(100% - 78px);
      padding:0;
      overflow:hidden;
    }
    #emailPanel.email-modal .panel-actions{margin-left:auto}
    #emailPanel.email-modal .panel-actions [data-minimize-panel="emailPanel"]{display:none}
    #emailPanel.email-modal .panel-icon-btn{width:30px;height:30px;font-size:28px;line-height:1}
    #emailPanel.email-modal .panel-resize-hint{display:block}
    .email-modal-layout{
      display:grid;
      grid-template-columns:220px minmax(0,1fr);
      height:100%;
      border-top:1px solid #edf2f7;
    }
    .email-template-column{
      background:#f8fafc;
      border-right:1px solid #edf2f7;
      padding:16px 14px 14px;
    }
    .email-template-heading{
      font-size:12px;
      font-weight:700;
      color:#94a3b8;
      margin-bottom:12px;
      text-transform:uppercase;
    }
    .email-template-list{display:flex;flex-direction:column;gap:10px}
    .email-template-btn{
      width:100%;
      text-align:left;
      border:1px solid #e2e8f0;
      background:#fff;
      border-radius:14px;
      padding:10px 12px;
      transition:.16s ease;
    }
    .email-template-btn:hover{border-color:#cbd5e1;transform:translateY(-1px)}
    .email-template-title{display:block;font-size:14px;font-weight:700;color:#334155;margin-bottom:0}
    .email-template-desc{display:none}
    .email-compose-area{
      padding:22px 26px 20px;
      display:grid;
      grid-template-rows:auto minmax(0,1fr) auto;
      gap:16px;
      min-width:0;
      height:100%;
      overflow:hidden;
    }
    .email-message-wrap{
      min-height:0;
      display:flex;
      flex-direction:column;
    }
    .email-top-fields{
      display:grid;
      grid-template-columns:minmax(0,1fr) minmax(0,1fr);
      gap:16px;
    }
    .email-field-label{
      font-size:13px;
      color:#94a3b8;
      margin-bottom:6px;
      display:block;
    }
    .email-input,.email-textarea{
      width:100%;
      border:1px solid #dbe3ee;
      border-radius:16px;
      background:#fff;
      color:#334155;
      outline:none;
    }
    .email-input{padding:12px 14px;font-size:16px}
    .email-textarea{
      padding:8px 16px;
      font-size:15px;
      resize:none;
      min-height:0;
      height:100%;
    }
    .email-input:focus,.email-textarea:focus{border-color:#84cc16}
    .email-footer{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:16px;
      margin-top:2px;
    }
    .email-contact-label{font-size:13px;color:#94a3b8}
    .email-footer-actions{display:flex;gap:10px}
    .sms-primary-btn,
.email-primary-btn{
  border-radius:16px;
  padding:11px 18px;
  font-size:15px;
  font-weight:600;
  background:#b7df6c;
  color:#fff;
  border:1px solid #b7df6c;
}

.sms-primary-btn:disabled,
.email-primary-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  
}

    @media (max-width: 980px){
      #emailPanel.email-modal{
        min-width:0;
        min-height:0;
        max-width:none;
        max-height:none;
      }
      .email-modal-layout{grid-template-columns:1fr}
      .email-template-column{border-right:none;border-bottom:1px solid #edf2f7}
      .email-template-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
      .email-top-fields{grid-template-columns:1fr}
      .email-textarea{min-height:220px}
    }

    
    .sms-primary-btn:disabled{
      opacity:.55;
      cursor:not-allowed;
      
    }
    @media (max-width: 900px){
      #smsPanel.sms-modal{
        min-width:0;
        min-height:0;
        max-width:none;
        max-height:none;
      }
      .sms-modal-layout{grid-template-columns:1fr}
      .sms-template-column{border-right:none;border-bottom:1px solid #edf2f7}
      .sms-template-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
      .sms-compose-area{grid-template-rows:auto auto 1fr auto}
      .sms-textarea{min-height:180px}
    }

    .dock{display:flex;flex-wrap:wrap;gap:8px}
    .dock-btn{display:inline-flex;align-items:center;gap:8px;border:1px solid #dbe3ee;background:#fff;border-radius:14px;padding:8px 12px;font-size:12px;color:#334155;box-shadow:0 2px 8px rgba(15,23,42,.04)}
    .dock-btn svg{color:#22c55e}
    .dock-btn.active{background:#f7fee7;border-color:#bef264}

    .scenario-picker-wrap{position:relative}
    .scenario-picker-btn{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;border-radius:18px;border:1px solid #e2e8f0;background:#fff;padding:12px 16px;text-align:left;font-size:14px;box-shadow:0 1px 2px rgba(15,23,42,.04);transition:.15s}
    .scenario-picker-btn:hover{background:#f8fafc}
    .scenario-picker-btn:focus{outline:none;border-color:#a3e635;box-shadow:0 0 0 3px rgba(163,230,53,.18)}
    .scenario-picker-btn .left{display:flex;align-items:center;gap:8px;min-width:0}
    .scenario-picker-btn .left span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .scenario-picker-portal{position:fixed;z-index:99999;overflow:hidden;border-radius:24px;border:1px solid #e2e8f0;background:#fff;box-shadow:0 25px 50px rgba(15,23,42,.18)}
    .scenario-picker-option{display:flex;width:100%;align-items:flex-start;justify-content:space-between;gap:14px;border-bottom:1px solid #f1f5f9;padding:8px 16px;text-align:left;background:#fff}
    .scenario-picker-option:hover{background:#f8fafc}
    .scenario-picker-option:last-child{border-bottom:none}
    .scenario-picker-option.active{background:#f7fee7}
    .scenario-picker-search{width:100%;border:1px solid #e2e8f0;border-radius:16px;padding:12px 14px;font-size:14px;outline:none}
    .scenario-picker-search:focus{border-color:#a3e635}
    .flow-history-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
    .flow-restart-btn{border:none;background:transparent;padding:0;font-size:14px;font-weight:500;color:#64748b;cursor:pointer;transition:.15s}
    .flow-restart-btn:hover{color:#0f172a}
    .flow-history-item{border:1px solid #dbe4f0;background:#fff;border-radius:14px;padding:9px 12px}
    .flow-history-question{font-size:12px;line-height:1.4;color:#94a3b8;margin-bottom:2px}
    .flow-history-answer{font-size:13px;font-weight:600;line-height:1.4;color:#0f172a}
    .flowOption{width:100%;border-radius:18px;border:1px solid #dbe4f0;background:#fff;padding:14px 16px;text-align:left;font-size:14px;font-weight:500;color:#0f172a;transition:.15s}
    .flowOption:hover{border-color:#a3e635;background:#f7fee7}
    .flowOption.selected{border-color:#a3e635;background:#f7fbe8;box-shadow:inset 0 0 0 1px rgba(163,230,53,.2)}
    .contacts-search-toggle{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:36px;
      height:36px;
      border-radius:12px;
      border:1px solid #e2e8f0;
      background:#fff;
      color:#64748b;
      transition:.15s ease;
      flex:0 0 36px;
    }
    .contacts-search-toggle:hover{background:#f8fafc;border-color:#cbd5e1}
    .contacts-search-wrap{margin-top:10px}
    .contacts-search-input{
      width:100%;
      border:1px solid #e2e8f0;
      border-radius:14px;
      padding:10px 12px;
      font-size:14px;
      outline:none;
      color:#334155;
      background:#fff;
    }
    .contacts-search-input:focus{border-color:#84cc16}
    .status-chip{
      display:inline-flex;
      align-items:center;
      gap:8px;
      border-radius:12px;
      padding:6px 10px;
      font-size:11px;
      line-height:1.15;
      font-weight:600;
      min-width:120px;
      justify-content:flex-start;
    }
    .status-chip .status-icon{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:18px;
      height:18px;
      border-radius:8px;
      border:1px solid currentColor;
      flex:0 0 18px;
    }
    .status-chip .status-icon svg{
      width:11px;
      height:11px;
    }
    .status-chip .status-text{
      display:flex;
      flex-direction:column;
      gap:2px;
      min-width:0;
    }
    .status-chip .status-text .sub{
      font-size:10px;
      font-weight:500;
      opacity:.8;
      white-space:nowrap;
    }

  
.active-status{background:#84cc16!important;color:#fff!important;border-color:#84cc16!important}
    .panel-collapsed .panel-body,.panel-collapsed .panel-resize-hint{display:none}
    .panel-collapsed{height:auto!important;min-height:0}
    .panel-collapsed .panel-header{border-bottom:none}
    #resultButtons .status-group-label{font-size:11px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:#94a3b8;margin:14px 0 6px}
    #resultButtons .status-item{border:1px solid #dbe3ef;border-radius:14px;background:#fff;padding:10px 12px;cursor:pointer;transition:.15s ease}
    #resultButtons .status-item:hover{border-color:#bfdbfe;background:#f8fbff}
    #resultButtons .status-item.active{border-color:#84cc16;background:#f7fee7}
    #resultButtons .status-item-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
    #resultButtons .status-item-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:14px;font-weight:500;color:#0f172a}
    #resultButtons .status-item-meta{font-size:11px;color:#94a3b8}
    #resultButtons .status-scenario-badge{display:inline-flex;align-items:center;gap:4px;border:1px solid #c7d2fe;border-radius:999px;background:#eef2ff;color:#4f46e5;padding:2px 8px;font-size:10px;font-weight:600;line-height:1}
    #resultButtons .status-scenario-badge svg{width:10px;height:10px;display:block}
    #resultButtons .status-item-fields{display:none;margin-top:10px;padding-top:10px;border-top:1px solid #e2e8f0}
    #resultButtons .status-item.expanded .status-item-fields{display:block}
    .status-field-label{display:block;font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#94a3b8;margin:0 0 6px}
    .status-field-input,.status-field-textarea,.status-field-select{width:100%;border:1px solid #dbe3ef;border-radius:12px;padding:9px 11px;font-size:13px;color:#0f172a;background:#fff}
    .status-field-textarea{min-height:78px;resize:vertical}
    .status-inline-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
    .status-inline-btn{border-radius:10px;padding:8px 12px;font-size:12px;font-weight:600;border:1px solid #dbe3ef;background:#fff;color:#475569}
    .status-inline-btn.primary{background:#84cc16;border-color:#84cc16;color:#fff}
    .status-summary{font-size:10px;font-weight:600;color:#94a3b8;white-space:nowrap}


.history-event-head{display:block;margin-bottom:6px}
.history-event-type{display:block;min-width:0}
.history-event-type > div{display:block !important}
.history-event-tag{float:right;margin-left:12px;margin-bottom:6px;padding:0;background:transparent;border:none;border-radius:0;font-size:12px;line-height:1.15;color:#334155;text-align:right}
.history-event-tag span{display:block !important}


.history-event-tag span{display:block}
.history-event-tag span:last-child{font-size:11px;color:#64748b}
.history-event-head::after{content:"";display:block;clear:both}


.history-event-card{transition:background 0.15s ease}
.history-event-card:hover{background:#f8fafc}


.history-audio-wrap{margin-top:8px}
.history-audio-note{font-size:13px;color:#64748b;margin-bottom:8px}
.history-audio-player{width:100%;height:40px}


.history-status-group{font-size:12px;line-height:1.35;color:#94a3b8;margin-bottom:2px}
.history-status-title{font-size:16px;line-height:1.35;font-weight:700;color:#0f172a}
.history-status-details{margin-top:8px;font-size:13px;line-height:1.45;color:#475569}
.history-status-details-row + .history-status-details-row{margin-top:4px}
.history-status-details-label{font-weight:600;color:#64748b}


.history-status-layout{display:grid;grid-template-columns:minmax(110px,140px) minmax(0,1fr);gap:14px 18px;align-items:start}
.history-status-col-title{font-size:12px;line-height:1.35;color:#94a3b8;margin-bottom:4px}
.history-status-value{font-size:16px;line-height:1.35;font-weight:700;color:#0f172a}
.history-status-details{display:flex;flex-direction:column;gap:6px}
.history-status-details-row{display:grid;grid-template-columns:110px minmax(0,1fr);gap:8px;font-size:13px;line-height:1.4;color:#475569}
.history-status-details-label{font-weight:600;color:#64748b}
.history-status-notes{grid-column:1 / -1;margin-top:6px;font-size:13px;line-height:1.45;color:#475569}
@media (max-width: 520px){
  .history-status-layout{grid-template-columns:1fr;gap:10px}
  .history-status-notes{grid-column:auto}
}


.history-status-col-title{display:none}
.history-status-details-row{display:block}
.history-status-details-label{display:block;font-size:12px;color:#94a3b8;margin-bottom:2px}
.history-status-details-row div:last-child{font-size:14px;color:#0f172a}








.contacts-tab-btn{
  position:relative;
}
.contacts-tab-count{
  position:absolute;
  top:-5px;
  right:-3px;
  min-width:14px;
  height:14px;
  padding:0 3px;
  border-radius:999px;
  background:#e2e8f0;
  color:#64748b;
  font-size:9px;
  line-height:14px;
  text-align:center;
  font-weight:700;
  pointer-events:none;
  z-index:2;
}


.manage-menu-item{display:flex;width:100%;align-items:flex-start;gap:12px;border-radius:16px;padding:12px 14px;text-align:left;transition:.15s ease}
.manage-menu-item:hover{background:#f8fafc}
.manage-menu-item.danger:hover{background:#fef2f2}
.manage-menu-icon{display:flex;height:36px;width:36px;flex:0 0 36px;align-items:center;justify-content:center;border-radius:12px;background:#f8fafc;color:#475569;border:1px solid #e2e8f0}
.manage-menu-item.danger .manage-menu-icon{background:#fff1f2;color:#dc2626;border-color:#fecdd3}
.manage-menu-copy{display:flex;min-width:0;flex-direction:column}
.manage-menu-title{font-size:14px;font-weight:700;color:#0f172a;line-height:1.25}
.manage-menu-desc{font-size:12px;color:#64748b;line-height:1.4;margin-top:2px}
.manage-menu-sep{height:1px;background:#f1f5f9;margin:4px 0}
.manage-menu-status{padding:10px 14px;font-size:12px;color:#64748b;border-top:1px solid #f1f5f9;background:#fcfcfd}
.manage-link-btn{display:inline-flex;align-items:center;gap:8px;border-radius:16px;border:1px solid #e2e8f0;background:#fff;padding:10px 14px;font-size:14px;font-weight:600;color:#0f172a;transition:.15s ease}
.manage-link-btn:hover{background:#f8fafc;border-color:#cbd5e1}
