/* AmiCRM - Orange & White Theme */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  /* ── Brand: Orange ── */
  --primary:#F47B20;--primary-dark:#d4640c;--primary-light:#FEF0E6;
  --primary-mid:#FB923C;
  --indigo:#F47B20;--indigo-dark:#d4640c;

  /* ── Status colours ── */
  --success:#16a34a;--success-light:#dcfce7;
  --warning:#d97706;--warning-light:#fef3c7;
  --danger:#dc2626;--danger-light:#fee2e2;--danger-text:#b91c1c;
  --info:#0369a1;--info-light:#e0f2fe;

  /* ── Sidebar: deep warm charcoal ── */
  --nav-bg:#1C1917;
  --nav-text:rgba(255,255,255,.75);
  --nav-text-muted:rgba(255,255,255,.40);
  --nav-active-bg:rgba(244,123,32,.18);
  --nav-active-text:#FB923C;
  --nav-hover-bg:rgba(255,255,255,.06);
  --nav-border:rgba(255,255,255,.07);

  /* ── Content area: clean white ── */
  --text:#18181B;--text-muted:#71717A;--text-subtle:#A1A1AA;
  --bg:#F8F7F5;--bg-card:#FFFFFF;--bg-secondary:#FAFAF9;
  --border:rgba(0,0,0,.07);--border-strong:rgba(0,0,0,.13);

  /* ── Topbar: white with orange accent ── */
  --topbar-bg:#FFFFFF;
  --topbar-border:rgba(0,0,0,.07);

  /* ── Shape & shadow ── */
  --radius:8px;--radius-lg:12px;--radius-xl:16px;
  --shadow:0 1px 3px rgba(0,0,0,.07),0 4px 16px rgba(0,0,0,.05);
  --shadow-md:0 4px 20px rgba(244,123,32,.12),0 1px 4px rgba(0,0,0,.06);
  --font:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}
html,body{height:100%;font-family:var(--font);background:var(--bg);color:var(--text);font-size:14.3px;line-height:1.5}
#app{height:100vh;overflow:hidden}
.screen{display:none;height:100%}.screen.active{display:flex;flex-direction:column}
/* LOGIN */
.login-wrap{flex:1;display:flex;align-items:center;justify-content:center;padding:20px;background:var(--bg)}
.login-card{background:var(--bg-card);border:0.5px solid var(--border);border-radius:var(--radius-xl);padding:50px 46px;width:100%;max-width:520px;box-shadow:var(--shadow)}
.login-brand{display:flex;align-items:center;gap:13px;margin-bottom:34px}
.login-brand-icon{width:46px;height:46px;background:var(--primary);border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:23px}
.login-brand-name{font-size:24px;font-weight:600;letter-spacing:-.3px}
.login-title{font-size:28px;font-weight:600;margin-bottom:8px}
.login-title-inline{font-size:19px;font-weight:600;margin:0 0 0 auto}
.login-sub{font-size:15.5px;color:var(--text-muted);margin-bottom:28px}
.login-brand-center{justify-content:center}
.login-title-center{text-align:center}
.login-sub-center{text-align:center}
.form-group{margin-bottom:18px}
.form-label{display:block;font-size:14px;font-weight:500;color:var(--text-muted);margin-bottom:7px}
.form-input{width:100%;height:56px;padding:0 16px;border:0.5px solid var(--border-strong);border-radius:var(--radius);font-size:16px;background:var(--bg-card);color:var(--text);outline:none;transition:border .15s;font-family:inherit}
.form-input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(244,123,32,.12)}
.btn-login{width:100%;height:56px;background:var(--primary);color:#fff;border:none;border-radius:var(--radius);font-size:16.5px;font-weight:600;cursor:pointer;transition:background .15s;font-family:inherit;margin-top:8px}
.btn-login:hover{background:var(--primary-dark)}.btn-login:disabled{opacity:.65;cursor:not-allowed}
.alert{border-radius:var(--radius);padding:10px 13px;font-size:14.3px;margin-bottom:12px}
.alert-error{background:var(--danger-light);color:#7a1d0e;border:0.5px solid #f0a090}
.demo-accounts{margin-top:22px;border-top:0.5px solid var(--border);padding-top:18px}
.demo-label{font-size:12.1px;font-weight:600;color:var(--text-subtle);text-transform:uppercase;letter-spacing:.08em;margin-bottom:10px}
.demo-card{display:flex;align-items:center;gap:11px;padding:9px 12px;border:0.5px solid var(--border);border-radius:var(--radius-lg);cursor:pointer;margin-bottom:7px;transition:all .15s}
.demo-card:hover{border-color:var(--primary);background:var(--primary-light)}
.demo-av{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13.2px;font-weight:600;flex-shrink:0}
.demo-info{flex:1}.demo-name{font-size:14.3px;font-weight:500}.demo-email{font-size:12.1px;color:var(--text-subtle)}
.role-pill{font-size:12.1px;padding:2px 9px;border-radius:99px;font-weight:500}
/* ── SIDEBAR ──────────────────────────────────── */
.sidebar{width:272px;background:#fff;border-right:1px solid #ECECEE;display:flex;flex-direction:column;flex-shrink:0;box-shadow:none;transition:width .18s ease,transform .22s ease;position:relative}
.sidebar::before{content:'';position:absolute;top:0;left:0;right:0;height:1px;background:var(--primary)}
.sidebar.collapsed{width:84px}
.sb-brand{padding:22px 18px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #F0F0F2}
.sidebar.collapsed .sb-brand{padding:22px 12px;gap:6px}
.sb-brand-icon{width:32px;height:32px;background:var(--primary);border-radius:9px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:16.5px;box-shadow:0 2px 8px rgba(244,123,32,.35);flex-shrink:0}
.sb-brand-name{font-size:16.5px;font-weight:700;color:#18181B;letter-spacing:-.2px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar.collapsed .sb-brand-name{display:none}
.sb-collapse-btn{width:24px;height:24px;border-radius:50%;border:1px solid #E4E4E7;background:#fff;color:#71717A;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:all .15s;font-size:13.2px}
.sb-collapse-btn:hover{background:#F4F4F5;color:var(--primary);border-color:var(--primary)}
.sb-collapse-btn i{transition:transform .18s ease}
.sidebar.collapsed .sb-collapse-btn i{transform:rotate(180deg)}
.sb-nav{flex:1;overflow-y:auto;padding:10px 10px}
.sb-section{font-size:10.5px;font-weight:700;color:#A1A1AA;text-transform:uppercase;letter-spacing:.1em;padding:12px 8px 5px}
.sidebar.collapsed .sb-section{display:none}
.sb-item{display:flex;align-items:center;gap:9px;padding:9px 11px;border-radius:10px;cursor:pointer;font-size:14.3px;color:#3F3F46;transition:all .15s;margin-bottom:2px;white-space:nowrap;position:relative}
.sb-item i{font-size:17.6px;flex-shrink:0;opacity:.75;color:#71717A}
.sb-item:hover:not(.locked):not(.active){background:#F7F7F8;color:#18181B}
.sb-item:hover:not(.locked):not(.active) i{opacity:1;color:#3F3F46}
.sb-item.active{background:var(--primary);color:#fff;font-weight:600;box-shadow:0 4px 12px rgba(244,123,32,.35)}
.sb-item.active i{color:#fff;opacity:1}
.sb-item.locked{opacity:.3;cursor:not-allowed}
.sb-item.muted{color:#A1A1AA}
.sb-item.editor-item i{color:#FB923C;opacity:1}
.sb-badge{margin-left:auto;font-size:11px;padding:2px 7px;border-radius:99px;font-weight:700;background:var(--primary);color:#fff;box-shadow:0 2px 6px rgba(244,123,32,.4)}
.sb-item.active .sb-badge{background:rgba(255,255,255,.28)}
.sb-badge.warn{background:var(--warning)}
.sb-footer{padding:8px 10px 14px;border-top:1px solid #F0F0F2}
.sidebar.collapsed .sb-nav .sb-item{font-size:0;justify-content:center;gap:0;padding:10px}
.sidebar.collapsed .sb-nav .sb-item i{font-size:18.7px}
.sidebar.collapsed .sb-badge{display:none}
.sb-user{display:flex;align-items:center;gap:10px;padding:12px 18px;border-bottom:1px solid #F0F0F2;cursor:pointer;transition:background .15s}
.sb-user:hover{background:#F7F7F8}
.sb-avatar{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex-shrink:0;color:#fff}
.sb-name{font-size:13px;font-weight:600;color:#18181B;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-role{font-size:10px;color:#A1A1AA;text-transform:uppercase;letter-spacing:.05em}
.sidebar.collapsed .sb-user{justify-content:center;padding:12px}
.sidebar.collapsed .sb-name,.sidebar.collapsed .sb-role{display:none}
/* ── APP LAYOUT ──────────────────────────────── */
.app-layout{display:flex;height:100%;overflow:hidden}
/* ── MAIN ──────────────────────────────────── */
.main-wrap{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}
.topbar{height:64px;background:var(--topbar-bg);border-bottom:1px solid var(--topbar-border);display:flex;align-items:center;justify-content:flex-end;padding:0 28px;gap:14px;flex-shrink:0}
.page-toolbar{background:var(--topbar-bg);border-bottom:1px solid var(--topbar-border);display:flex;align-items:center;padding:14px 28px;gap:14px;flex-shrink:0;box-shadow:0 1px 0 rgba(0,0,0,.06)}
.page-toolbar .search-box{width:300px;background:#fff;border-color:#E4E4E7}
.page-toolbar .btn-ghost{border-color:#E4E4E7;background:#fff}
.page-toolbar .btn-ghost:hover{background:var(--bg);border-color:var(--border-strong)}
.page-toolbar #add-btn{padding:10px 22px;font-size:13.2px;font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.topbar-title{font-size:20.9px;font-weight:700;flex:1;letter-spacing:-.3px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.topbar-actions{display:flex;align-items:center;gap:8px}
.search-box{display:flex;align-items:center;gap:8px;background:var(--bg);border:1px solid var(--border-strong);border-radius:10px;padding:9px 14px;width:220px;transition:all .15s;flex-shrink:1;min-width:0}
.search-box:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px rgba(244,123,32,.12);background:#fff}
.search-box i{font-size:15.4px;color:var(--text-subtle);flex-shrink:0}
.search-box input{border:none;background:transparent;outline:none;font-size:14.3px;color:var(--text);width:100%;min-width:0;font-family:inherit}
.content-area{flex:1;overflow-y:auto;padding:24px;background:var(--bg)}
.mobile-menu-btn{display:none;width:36px;height:36px;border-radius:9px;border:1px solid var(--border-strong);background:var(--bg-card);color:var(--text);align-items:center;justify-content:center;cursor:pointer;font-size:19.8px;flex-shrink:0;margin-right:auto}
.mobile-menu-btn:hover{background:var(--bg)}
.sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:190}
.sidebar-backdrop.open{display:block}
/* ── TOPBAR PROFILE ───────────────────────────── */
.tb-profile{display:flex;align-items:center;gap:4px;padding:5px 6px 5px 5px;border-radius:10px;position:relative;flex-shrink:0;cursor:pointer;transition:background .15s}
.tb-profile:hover{background:var(--bg)}
.tb-profile-main{display:flex;align-items:center;gap:9px}
.tb-avatar{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13.2px;font-weight:700;flex-shrink:0;background:var(--primary);color:#fff}
.tb-profile-text{line-height:1.3;min-width:0}
.tb-name{font-size:14.3px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}
.tb-company{font-size:12.1px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}
.tb-chevron{font-size:14.3px;color:var(--text-subtle);transition:transform .15s}
.tb-profile.open .tb-chevron{transform:rotate(180deg)}
.tb-profile-menu{display:none;position:absolute;top:calc(100% + 8px);right:0;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:0 8px 28px rgba(0,0,0,.14);min-width:200px;padding:8px;z-index:50}
.tb-profile.open .tb-profile-menu{display:block}
.tb-menu-divider{height:1px;background:var(--border);margin:6px 4px}
.tb-menu-item{display:flex;align-items:center;gap:9px;padding:9px 10px;border-radius:8px;font-size:14.3px;color:var(--text);cursor:pointer;transition:background .15s}
.tb-menu-item:hover{background:var(--primary-light);color:var(--primary)}
.tb-menu-item i{font-size:17.6px;color:var(--text-subtle)}
.tb-menu-item:hover i{color:var(--primary)}
.tb-menu-item.danger{color:#DC2626}
.tb-menu-item.danger i{color:#DC2626}
.tb-menu-item.danger:hover{background:#FEF2F2;color:#DC2626}
.tb-menu-item.danger:hover i{color:#DC2626}
/* ── PROFILE PAGE ─────────────────────────────── */
.profile-breadcrumb{display:flex;justify-content:flex-end;align-items:center;gap:6px;font-size:13.2px;color:var(--text-subtle);margin-bottom:14px}
.profile-breadcrumb i{font-size:14.3px}
.pbc-item{cursor:pointer}
.pbc-item:hover{color:var(--text)}
.pbc-item.current{color:var(--primary);font-weight:700;cursor:default}
.profile-card-wrap{width:100%;border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow);background:var(--bg-card)}
.profile-banner{background:var(--primary);color:#fff;font-size:15.4px;font-weight:700;padding:14px 22px}
.profile-card{padding:26px}
.profile-header{display:flex;align-items:center;gap:20px;padding-bottom:22px;border-bottom:1px solid var(--border);margin-bottom:18px;flex-wrap:nowrap}
.profile-avatar{width:80px;height:80px;border-radius:var(--radius-lg);display:flex;align-items:center;justify-content:center;font-size:28.6px;font-weight:700;flex-shrink:0;background:var(--bg);color:var(--primary)}
.profile-upload-block{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.btn-upload-photo{background:#18181B;color:#fff;border:none;border-radius:99px;padding:10px 22px;font-size:13.2px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;cursor:pointer;font-family:inherit;transition:background .15s}
.btn-upload-photo:hover{background:#000}
.profile-upload-note{font-size:12.1px;color:var(--text-subtle);max-width:220px}
.profile-header-info{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.profile-name{font-size:19.8px;font-weight:700;color:var(--text)}
.profile-email{font-size:14.3px;color:var(--text)}
.status-pill{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;padding:3px 10px;border-radius:99px;margin-top:2px}
.status-pill.active{background:#E1F5EE;color:#0F6E56}
.profile-section-title{font-size:15.4px;font-weight:700;color:var(--text);padding-bottom:10px;border-bottom:1px solid var(--border);margin-bottom:18px}
.profile-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px 24px}
.profile-field label{display:block;font-size:12.1px;font-weight:600;color:var(--text-subtle);text-transform:uppercase;letter-spacing:.05em;margin-bottom:5px}
.profile-field span{font-size:15.4px;color:var(--text);font-weight:500}
.page{display:none}.page.active{display:block}
/* ── BUTTONS ──────────────────────────────────── */
.btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:var(--radius);font-size:14.3px;font-weight:500;cursor:pointer;border:1px solid var(--border-strong);background:var(--bg-card);color:var(--text);transition:all .15s;white-space:nowrap;font-family:inherit}
.btn:hover{background:var(--bg);border-color:rgba(0,0,0,.2)}
.btn-primary{background:var(--primary);color:#fff;border-color:var(--primary);box-shadow:0 2px 8px rgba(244,123,32,.3)}
.btn-primary:hover{background:var(--primary-dark);box-shadow:0 4px 12px rgba(244,123,32,.4)}
.btn-ghost{color:var(--text-muted);border-color:transparent;background:transparent}
.btn-ghost:hover{background:var(--bg);border-color:var(--border-strong);color:var(--text)}
.btn-danger{color:var(--danger-text);border-color:#fca5a5;background:#fff}
.btn-danger:hover{background:var(--danger-light)}
.btn-sm{padding:5px 10px;font-size:13.2px}
.btn-edit-layout{background:var(--primary-light);color:var(--primary);border-color:rgba(244,123,32,.3);margin-left:auto}
/* CARDS */
.card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px;margin-bottom:14px;box-shadow:var(--shadow)}
.card:last-child{margin-bottom:0}
.card-header{font-size:14.3px;font-weight:600;margin-bottom:13px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.record-count{font-size:13.2px;color:var(--text-subtle);font-weight:400}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
.metrics-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.metric-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px;box-shadow:var(--shadow);transition:box-shadow .15s}.metric-card:hover{box-shadow:var(--shadow-md)}
.metric-label{font-size:13.2px;color:var(--text-muted);display:flex;align-items:center;gap:5px;margin-bottom:7px}
.metric-value{font-size:28.6px;font-weight:700;line-height:1}
.metric-sub{font-size:12.1px;color:var(--text-subtle);margin-top:4px}
/* TABLE */
.table-wrap{overflow-x:auto}
.data-table{width:100%;border-collapse:collapse;font-size:14.3px}
.data-table th{text-align:left;padding:10px 14px;font-size:11.6px;font-weight:700;color:var(--text-muted);border-bottom:1px solid var(--border);text-transform:uppercase;letter-spacing:.06em;white-space:nowrap;background:var(--bg-secondary)}
.data-table td{padding:10px 14px;border-bottom:1px solid var(--border);vertical-align:middle}
.data-table tr:last-child td{border-bottom:none}
.data-table tbody tr:hover td{background:var(--primary-light)}
/* TAGS */
.tag{display:inline-flex;align-items:center;font-size:12.1px;padding:2px 9px;border-radius:99px;font-weight:500;white-space:nowrap}
.tag-purple{background:#EEEDFE;color:#534AB7}.tag-blue{background:#E6F1FB;color:#185FA5}
.tag-teal{background:#E1F5EE;color:#0F6E56}.tag-amber{background:#FAEEDA;color:#854F0B}
.tag-green{background:#EAF3DE;color:#3B6D11}.tag-red{background:#FCEBEB;color:#A32D2D}
.tag-gray{background:#F1EFE8;color:#5F5E5A}
.avatar{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12.1px;font-weight:600}
/* ACCESS DENIED */
.access-denied{text-align:center;padding:80px 20px}
.access-denied i{font-size:57.2px;color:var(--text-subtle);margin-bottom:16px;display:block}
.access-denied h3{font-size:19.8px;font-weight:600;margin-bottom:8px}
.access-denied p{font-size:15.4px;color:var(--text-muted)}
/* MODAL */
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:500;align-items:center;justify-content:center;padding:20px}
.modal-overlay.open{display:flex}
.modal-box{background:var(--bg-card);border-radius:var(--radius-xl);padding:28px;width:520px;max-width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.2),0 4px 16px rgba(0,0,0,.1)}
.modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}
.modal-header h3{font-size:18.7px;font-weight:600}
.modal-close{background:none;border:none;cursor:pointer;color:var(--text-muted);font-size:19.8px;display:flex;align-items:center}
.modal-close:hover{color:var(--text)}
.modal-footer{display:flex;justify-content:flex-end;gap:9px;margin-top:20px;padding-top:16px;border-top:0.5px solid var(--border)}
/* DYNAMIC FORM */
.dyn-section-title{font-size:14.3px;font-weight:600;color:#374151;padding-bottom:9px;border-bottom:0.5px solid var(--border);margin-bottom:13px;margin-top:8px}
.dyn-section-title:first-child{margin-top:0}
.dyn-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}
.dyn-row.full{grid-template-columns:1fr}
.dyn-field{display:flex;flex-direction:column}
.dyn-field label{font-size:13.2px;font-weight:500;color:var(--text-muted);margin-bottom:5px}
.req-star{color:#e24b4a;margin-left:2px}
.field-error{display:none;color:#e24b4a;font-size:12px;margin-top:4px}
.dyn-field.has-error input,.dyn-field.has-error select,.dyn-field.has-error textarea{border-color:#e24b4a}
.dyn-field input,.dyn-field select,.dyn-field textarea{padding:8px 11px;border:0.5px solid var(--border-strong);border-radius:var(--radius);font-size:14.3px;background:var(--bg-card);color:var(--text);outline:none;font-family:inherit;transition:border .15s;height:38px}
.dyn-field textarea{height:80px;resize:vertical}
.dyn-field input:focus,.dyn-field select:focus,.dyn-field textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(244,123,32,.12)}
/* EDITOR */
.editor-wrap{display:flex;flex-direction:column;height:100vh;overflow:hidden}
.ed-nav{height:48px;background:var(--nav-bg);display:flex;align-items:center;padding:0 14px;gap:9px;flex-shrink:0}
.ed-back-btn{background:none;border:none;cursor:pointer;color:#9ca3af;font-size:17.6px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius);transition:all .15s}
.ed-back-btn:hover{background:rgba(255,255,255,.1);color:#fff}
.ed-mod-label{display:flex;align-items:center;gap:6px;color:#fff;font-size:14.3px;font-weight:500}
.ed-version{display:flex;align-items:center;gap:5px;background:rgba(255,255,255,.1);border:0.5px solid rgba(255,255,255,.15);border-radius:var(--radius);padding:4px 10px;cursor:pointer;color:#fff;font-size:13.2px}
.ed-nav-actions{margin-left:auto;display:flex;gap:7px}
.btn-ed{padding:5px 13px;border-radius:var(--radius);font-size:13.2px;font-weight:500;cursor:pointer;border:none;font-family:inherit;transition:all .15s}
.preview-btn{background:transparent;color:#9ca3af;border:0.5px solid rgba(255,255,255,.15)!important;border-style:solid!important;display:inline-flex;align-items:center;gap:4px}
.preview-btn:hover{background:rgba(255,255,255,.08)}
.cancel-btn{background:transparent;color:#9ca3af;border:0.5px solid rgba(255,255,255,.15)!important}
.cancel-btn:hover{background:rgba(255,255,255,.08)}
.saveclose-btn{background:var(--indigo);color:#fff}
.saveclose-btn:hover{background:var(--indigo-dark)}
.save-btn{background:#22c55e;color:#fff}
.save-btn:hover{background:#16a34a}
.ed-module-bar{height:44px;background:var(--bg-card);border-bottom:0.5px solid var(--border);display:flex;align-items:center;padding:0 14px;gap:3px;flex-shrink:0}
.ed-mod-tab{display:flex;align-items:center;gap:7px;padding:7px 13px;border-radius:var(--radius);cursor:pointer;font-size:14.3px;color:var(--text-muted);transition:all .15s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
.ed-mod-tab:hover{background:var(--bg);color:var(--text)}
.ed-mod-tab.active{background:var(--primary-light);color:var(--primary);font-weight:500}
.ed-mod-tab i{font-size:16.5px}
.ed-mod-count{font-size:11px;background:var(--bg);border-radius:99px;padding:1px 6px;color:var(--text-subtle)}
.ed-mod-tab.active .ed-mod-count{background:rgba(83,74,183,.12);color:var(--primary)}
.ed-body{display:flex;flex:1;overflow:hidden}
.ed-palette{width:213px;background:var(--bg-card);border-right:0.5px solid var(--border);display:flex;flex-direction:column;overflow:hidden;flex-shrink:0}
.ed-palette-section{padding:9px 11px 7px;font-size:12.1px;font-weight:500;color:var(--text-muted);display:flex;align-items:center;justify-content:space-between;border-bottom:0.5px solid var(--border);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
.ed-palette-section:hover{background:var(--bg-secondary)}
.palette-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:8px 8px 7px;border-bottom:0.5px solid var(--border);overflow-y:auto;max-height:260px}
.palette-pill{display:flex;align-items:center;gap:5px;padding:5px 7px;border:0.5px solid var(--border);border-radius:7px;cursor:grab;font-size:12.1px;color:var(--text-muted);background:var(--bg-card);transition:all .15s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
.palette-pill:hover{border-color:var(--indigo);color:var(--indigo);background:#EEEDFE}
.palette-pill.dragging{opacity:.35}
.palette-pill i{font-size:14.3px;flex-shrink:0}
.palette-comps{padding:8px 8px 7px;border-bottom:0.5px solid var(--border)}
.comp-pill{display:flex;align-items:center;gap:7px;padding:7px 9px;border:0.5px solid var(--border);border-radius:7px;cursor:grab;font-size:13.2px;margin-bottom:5px;color:var(--text-muted);background:var(--bg-card)}
.comp-pill:last-child{margin-bottom:0}
.comp-pill:hover{border-color:var(--indigo);color:var(--indigo)}
.ed-unused-bar{margin:7px 8px 4px;padding:7px 10px;border:0.5px solid var(--border);border-radius:7px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:13.2px;color:var(--text-muted)}
.ed-unused-bar:hover{border-color:var(--indigo)}
.unused-badge{background:var(--indigo);color:#fff;border-radius:99px;padding:1px 7px;font-size:11px;font-weight:500}
.ed-cfl{padding:5px 9px 8px;font-size:12.1px;color:var(--indigo)}
.ed-main{flex:1;display:flex;flex-direction:column;overflow:hidden}
.ed-view-tabs{height:40px;background:var(--bg-card);border-bottom:0.5px solid var(--border);display:flex;align-items:flex-end;padding:0 18px;flex-shrink:0}
.ed-vtab{padding:8px 15px;font-size:14.3px;cursor:pointer;color:var(--text-muted);border-bottom:2px solid transparent;margin-bottom:-0.5px;transition:all .15s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
.ed-vtab.active{color:var(--indigo);border-bottom-color:var(--indigo);font-weight:500}
.ed-vtab:hover:not(.active){color:var(--text)}
.ed-canvas-wrap{flex:1;overflow-y:auto;padding:18px 24px;background:var(--bg)}
.ed-canvas{background:var(--bg-card);border-radius:var(--radius-lg);border:0.5px solid var(--border);padding:18px;min-height:520px}
.ed-img-row{display:flex;align-items:center;gap:11px;margin-bottom:18px}
.ed-img-placeholder{width:50px;height:50px;border-radius:50%;background:var(--bg-secondary);border:0.5px solid var(--border-strong);display:flex;align-items:center;justify-content:center;color:var(--text-subtle);font-size:22px;position:relative;flex-shrink:0}
.ed-img-dots{position:absolute;top:-5px;left:-2px;font-size:11px;color:var(--text-subtle);background:var(--bg-card);padding:1px 5px;border-radius:5px;border:0.5px solid var(--border)}
.ed-toggle{width:34px;height:19px;border-radius:99px;cursor:pointer;position:relative;transition:background .2s;flex-shrink:0;margin-left:8px}
.ed-toggle.on{background:#22c55e}.ed-toggle.off{background:#d1d5db}
.ed-toggle-thumb{width:13px;height:13px;background:#fff;border-radius:50%;position:absolute;top:3px;transition:left .2s;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.ed-toggle.on .ed-toggle-thumb{left:18px}.ed-toggle.off .ed-toggle-thumb{left:3px}
.ed-section-block{margin-bottom:16px}
.ed-section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;padding-bottom:8px;border-bottom:0.5px solid var(--border)}
.ed-section-title{font-size:15.4px;font-weight:500}
.ed-section-actions{display:flex;gap:4px}
.ed-sec-btn{background:none;border:none;cursor:pointer;color:var(--text-subtle);font-size:15.4px;padding:3px 5px;border-radius:6px;transition:all .15s}
.ed-sec-btn:hover{color:var(--indigo);background:#EEEDFE}
.ed-sec-btn.del:hover{color:var(--danger-text);background:var(--danger-light)}
.ed-field-row{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:8px}
.ed-field-row.full{grid-template-columns:1fr}
.ed-field{border:0.5px solid var(--border);border-radius:var(--radius);padding:9px 12px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:var(--bg-card);transition:all .15s;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:40px}
.ed-field:hover{border-color:var(--indigo);background:#EEEDFE08}
.ed-field.is-required{border-left:2.5px solid #e24b4a;border-radius:0 var(--radius) var(--radius) 0}
.ed-field.drop-target{border:2px dashed var(--indigo);background:#EEEDFE18}
.ed-field.empty{border:1.5px dashed var(--border-strong);background:var(--bg-secondary);justify-content:center;color:var(--text-subtle)}
.ed-field.empty:hover{border-color:var(--indigo);color:var(--indigo);background:#EEEDFE18}
.ed-field-label{display:flex;align-items:center;gap:7px;font-size:14.3px;min-width:0}
.ed-field-label i{font-size:15.4px;color:var(--text-subtle);flex-shrink:0}
.ed-field-unique{font-size:11px;color:var(--text-subtle);margin-left:3px}
.ed-field-menu{font-size:16.5px;color:var(--text-subtle);cursor:pointer;opacity:0;transition:opacity .15s;padding:2px 5px;border-radius:4px;flex-shrink:0}
.ed-field:hover .ed-field-menu{opacity:1}
.ed-field-menu:hover{background:var(--bg-secondary)}
.ed-add-section-btn{width:100%;padding:9px;border:1.5px dashed var(--border-strong);border-radius:var(--radius);background:transparent;color:var(--text-subtle);font-size:13.2px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:all .15s;font-family:inherit}
.ed-add-section-btn:hover{border-color:var(--indigo);color:var(--indigo);background:#EEEDFE18}
/* CTX */
.ctx-menu{position:fixed;background:var(--bg-card);border:0.5px solid var(--border-strong);border-radius:10px;padding:5px;min-width:168px;z-index:600;box-shadow:var(--shadow);display:none}
.ctx-item{display:flex;align-items:center;gap:9px;padding:7px 11px;border-radius:6px;cursor:pointer;font-size:13.2px;color:var(--text)}
.ctx-item i{font-size:15.4px;color:var(--text-muted)}
.ctx-item:hover{background:var(--bg-secondary)}
.ctx-item:hover i{color:var(--indigo)}
.ctx-danger{color:var(--danger-text)}.ctx-danger i{color:var(--danger-text)!important}
.ctx-danger:hover{background:var(--danger-light)!important}
.ctx-divider{height:0.5px;background:var(--border);margin:4px 0}
/* TOAST */
.toast-container{position:fixed;bottom:18px;right:18px;display:flex;flex-direction:column;gap:8px;z-index:999;pointer-events:none}
.toast{background:var(--bg-card);border:0.5px solid var(--border-strong);border-radius:10px;padding:10px 15px;display:flex;align-items:center;gap:9px;font-size:14.3px;min-width:240px;pointer-events:auto;box-shadow:var(--shadow);animation:toastIn .22s ease}
.toast.success{border-left:3px solid #22c55e}
.toast.error{border-left:3px solid var(--danger)}
.toast.info{border-left:3px solid var(--primary)}
@keyframes toastIn{from{transform:translateY(18px);opacity:0}to{transform:none;opacity:1}}
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-thumb{background:rgba(0,0,0,.15);border-radius:99px}

/* ── FILTER BAR ─────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 0 14px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
}
.filter-label {
  font-size: 12.1px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.filter-label i { font-size: 14.3px; }
.filter-select,
.filter-input {
  height: 34px;
  padding: 0 10px;
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 13.2px;
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  font-family: var(--font);
  cursor: pointer;
  transition: border .15s;
}
.filter-select:focus,
.filter-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(83,74,183,.08); }
.filter-input { cursor: text; min-width: 140px; }
.filter-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--radius);
  font-size: 13.2px;
  font-weight: 500;
  cursor: pointer;
  border: 0.5px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all .15s;
  font-family: var(--font);
  align-self: flex-end;
  height: 34px;
}
.filter-clear-btn:hover { background: var(--danger-light); color: var(--danger-text); border-color: #f0a090; }
.filter-active-badge {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 12.1px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 99px;
  padding: 2px 10px;
  align-self: flex-end;
  margin-bottom: 1px;
}
/* Sortable column headers */
.data-table th { transition: background .15s; }
.data-table th:hover { background: var(--bg-secondary); }

/* ══════════════════════════════════════
   DETAIL PANEL + ACTIVITIES
══════════════════════════════════════ */
.detail-panel-overlay {
  display: none; position: fixed; inset: 0; z-index: 600;
}
.detail-panel-overlay.open { display: flex; justify-content: flex-end; }
.detail-panel-bg {
  position: absolute; inset: 0; background: rgba(0,0,0,.35);
}
.detail-panel {
  position: relative; width: 620px; max-width: 96vw;
  background: var(--bg-card); display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
  box-shadow: -6px 0 30px rgba(0,0,0,.12);
  animation: slideInRight .25s ease;
}
@keyframes slideInRight { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }

/* PANEL HEADER */
.dp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 16px; border-bottom: 0.5px solid var(--border);
  flex-shrink: 0; gap: 12px;
}
.dp-header-info { display: flex; align-items: center; gap: 13px; min-width: 0; }
.dp-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--primary-light);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 17.6px; font-weight: 700; flex-shrink: 0;
}
.dp-title { font-size: 17.6px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-subtitle { font-size: 13.2px; color: var(--text-muted); margin-top: 2px; }
.dp-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.dp-close-btn {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: var(--bg-secondary); cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--text-muted); font-size: 17.6px; transition: all .15s;
}
.dp-close-btn:hover { background: var(--danger-light); color: var(--danger-text); }

/* INFO SECTION */
.dp-info-section {
  padding: 14px 20px; border-bottom: 0.5px solid var(--border); flex-shrink: 0;
}
.dp-section-label {
  font-size: 11px; font-weight: 600; color: var(--text-subtle);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px;
}
.dp-info-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.di-item {}
.di-label { font-size: 12.1px; color: var(--text-muted); margin-bottom: 3px; }
.di-value { font-size: 14.3px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ACTIVITIES */
.dp-activities {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
.act-tabs {
  display: flex; align-items: center; gap: 0;
  border-bottom: 0.5px solid var(--border); padding: 0 20px; flex-shrink: 0;
  background: var(--bg-secondary);
}
.act-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; font-size: 14.3px; cursor: pointer;
  color: var(--text-muted); border: none; background: transparent;
  border-bottom: 2px solid transparent; margin-bottom: -0.5px;
  transition: all .15s; font-family: var(--font); white-space: nowrap;
}
.act-tab i { font-size: 15.4px; }
.act-tab:hover { color: var(--text); }
.act-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.act-tab-count {
  background: var(--primary-light); color: var(--primary);
  border-radius: 99px; font-size: 11px; padding: 1px 6px; font-weight: 600;
  min-width: 16px; text-align: center;
}
.act-panel-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
}

/* ADD BOX */
.act-add-box {
  background: var(--bg-secondary); border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px; margin-bottom: 16px;
}
.act-textarea {
  width: 100%; padding: 9px 12px; border: 0.5px solid var(--border-strong);
  border-radius: var(--radius); font-size: 14.3px; background: var(--bg-card);
  color: var(--text); outline: none; font-family: var(--font); resize: vertical;
  transition: border .15s;
}
.act-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(83,74,183,.08); }
.act-input {
  width: 100%; height: 36px; padding: 0 11px; border: 0.5px solid var(--border-strong);
  border-radius: var(--radius); font-size: 14.3px; background: var(--bg-card);
  color: var(--text); outline: none; font-family: var(--font); transition: border .15s;
}
.act-input:focus { border-color: var(--primary); }
.act-field-label { display: block; font-size: 12.1px; font-weight: 500; color: var(--text-muted); margin-bottom: 5px; }

/* ACTIVITY CARDS */
.act-list { display: flex; flex-direction: column; gap: 10px; }
.act-card {
  background: var(--bg-card); border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 13px 14px;
  transition: border-color .15s;
}
.act-card:hover { border-color: var(--border-strong); }
.act-card.act-card-done { opacity: .7; }
.act-card-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.act-card-meta { display: flex; align-items: center; gap: 10px; }
.act-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.1px; font-weight: 600; flex-shrink: 0;
}
.act-icon-box {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.act-card-author { font-size: 14.3px; font-weight: 500; }
.act-card-time { font-size: 12.1px; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.act-card-body { font-size: 14.3px; color: var(--text); margin-top: 10px; line-height: 1.6; }
.act-card-footer { font-size: 12.1px; color: var(--text-subtle); margin-top: 8px; padding-top: 8px; border-top: 0.5px solid var(--border); }
.act-del-btn {
  background: none; border: none; cursor: pointer; color: var(--text-subtle);
  padding: 3px 5px; border-radius: 5px; font-size: 15.4px; transition: all .15s; flex-shrink: 0;
}
.act-del-btn:hover { color: var(--danger-text); background: var(--danger-light); }
.act-check { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); flex-shrink: 0; }
.act-badge {
  font-size: 12.1px; padding: 2px 9px; border-radius: 99px; font-weight: 500; white-space: nowrap;
}
.act-badge-sel {
  font-size: 12.1px; border: none; background: transparent; cursor: pointer;
  color: inherit; font-family: var(--font); outline: none; padding: 0;
}
.act-empty {
  text-align: center; padding: 36px 20px;
  color: var(--text-subtle); font-size: 14.3px;
}
.act-empty i { font-size: 39.6px; display: block; margin-bottom: 10px; color: var(--text-subtle); }

/* TIMELINE */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item {
  display: flex; gap: 14px; padding-bottom: 20px; position: relative;
}
.tl-item::before {
  content: ''; position: absolute; left: 15px; top: 32px; bottom: 0;
  width: 1.5px; background: var(--border); z-index: 0;
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; z-index: 1; margin-top: 2px;
}
.tl-content { flex: 1; min-width: 0; }
.tl-type { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 3px; }
.tl-title { font-size: 14.3px; font-weight: 500; margin-bottom: 3px; word-break: break-word; }
.tl-meta { font-size: 12.1px; color: var(--text-muted); }

/* View button in table */
.btn-view {
  background: #f0f0ff; color: var(--primary);
  border-color: #d0cdf5;
}
.btn-view:hover { background: var(--primary-light); }

/* ═══════════════════════════════════════
   USER MANAGEMENT
═══════════════════════════════════════ */
.um-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap; gap: 12px;
}
.um-title { font-size: 19.8px; font-weight: 600; }
.um-sub   { font-size: 14.3px; color: var(--text-muted); margin-top: 3px; }
.um-table-wrap { overflow-x: auto; }

/* PERMISSION SECTION IN MODAL */
.perm-section {
  background: var(--bg-secondary);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 4px;
}
.perm-section-title {
  font-size: 14.3px; font-weight: 600;
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 14px; color: var(--text);
}
.perm-role-hint { font-size: 12.1px; color: var(--text-muted); font-weight: 400; margin-left: auto; }

.perm-matrix-wrap { overflow-x: auto; }
.perm-matrix-table {
  width: 100%; border-collapse: collapse; font-size: 14.3px;
}
.perm-matrix-table th {
  text-align: center; padding: 8px 10px;
  font-size: 12.1px; font-weight: 600; color: var(--text-muted);
  border-bottom: 0.5px solid var(--border);
  text-transform: uppercase; letter-spacing: .05em;
  background: var(--bg-card);
}
.perm-matrix-table th.perm-mod-col { text-align: left; width: 150px; }
.perm-matrix-table td {
  padding: 9px 10px; border-bottom: 0.5px solid var(--border);
  text-align: center; vertical-align: middle;
}
.perm-matrix-table tr:last-child td { border-bottom: none; }
.perm-matrix-table tbody tr:hover td { background: var(--bg-card); }
.perm-mod-col { text-align: left !important; }
.perm-act-col { width: 72px; }

/* Custom checkbox */
.perm-check-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; width: 24px; height: 24px;
}
.perm-check-wrap input[type=checkbox] { display: none; }
.perm-chk-box {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-card); transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.perm-check-wrap input:checked ~ .perm-chk-box {
  background: var(--primary); border-color: var(--primary);
}
.perm-check-wrap input:checked ~ .perm-chk-box::after {
  content: ''; width: 5px; height: 9px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px,-1px);
  display: block;
}
.perm-check-wrap:hover .perm-chk-box { border-color: var(--primary); }

.perm-row td { transition: background .12s; }

/* ── SEARCH ENHANCEMENTS ─────────────────────── */
.search-box {
  position: relative;
  transition: width .2s;
}
.search-box input:focus {
  outline: none;
}
.search-box:focus-within {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(244,123,32,.12);
}
.search-box input::placeholder {
  color: var(--text-subtle);
  font-size: 13.2px;
}

/* Search results highlight */
mark {
  background: #FAEEDA;
  color: #854F0B;
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 500;
}

/* No results state */
.search-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-subtle);
}
.search-empty i {
  font-size: 48.4px;
  display: block;
  margin-bottom: 14px;
  color: var(--text-subtle);
}
.search-empty h3 {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* Keyboard shortcut hint */
.search-shortcut {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12.1px;
  color: var(--text-subtle);
  background: var(--bg-secondary);
  border: 0.5px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── CHART EMPTY STATE ───────────────────────── */
.chart-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-subtle); gap: 8px; font-size: 14.3px;
  background: var(--bg-card); border-radius: var(--radius-lg);
}
.chart-empty i { font-size: 39.6px; }

/* ── SPIN ANIMATION ─────────────────────────── */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════
   DATA IMPORT WIZARD
═══════════════════════════════════════ */
.imp-wrap { display:flex; flex-direction:column; gap:0; min-height:400px; }

/* Step indicator */
.imp-steps {
  display:flex; align-items:center;
  margin-bottom:20px; padding-bottom:16px;
  border-bottom:0.5px solid var(--border);
}
.imp-step {
  display:flex; align-items:center; gap:7px;
  font-size:13.2px; color:var(--text-subtle);
  white-space:nowrap;
}
.imp-step.active { color:var(--primary); font-weight:600; }
.imp-step.done   { color:var(--success); }
.imp-step-num {
  width:24px; height:24px; border-radius:50%;
  background:var(--bg); border:1.5px solid currentColor;
  display:flex; align-items:center; justify-content:center;
  font-size:12.1px; font-weight:700; flex-shrink:0;
}
.imp-step.active .imp-step-num { background:var(--primary); color:#fff; border-color:var(--primary); }
.imp-step.done   .imp-step-num { background:var(--success); color:#fff; border-color:var(--success); }
.imp-step-line { flex:1; height:1.5px; background:var(--border); margin:0 10px; }
.imp-step-lbl { font-size:13.2px; }

/* Module grid */
.imp-mod-grid {
  display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:16px;
}
.imp-mod-card {
  display:flex; flex-direction:column; align-items:center; gap:7px;
  padding:12px 8px; border:0.5px solid var(--border); border-radius:var(--radius-lg);
  cursor:pointer; font-size:13.2px; font-weight:500; color:var(--text-muted);
  transition:all .15s; text-align:center; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;
}
.imp-mod-card i { font-size:24.2px; }
.imp-mod-card:hover { border-color:var(--primary); color:var(--primary); background:var(--primary-light); }
.imp-mod-card.active { border-color:var(--primary); background:var(--primary-light); color:var(--primary); }

/* Dropzone */
.imp-dropzone {
  border:2px dashed var(--border-strong); border-radius:var(--radius-lg);
  padding:30px 20px; text-align:center; transition:all .15s;
  background:var(--bg-secondary); cursor:pointer; margin-bottom:10px;
}
.imp-dropzone:hover, .imp-dropzone.over {
  border-color:var(--primary); background:var(--primary-light);
}

/* File info bar */
.imp-file-info {
  display:flex; align-items:center; gap:10px;
  padding:10px 14px; background:var(--bg-secondary);
  border:0.5px solid var(--border); border-radius:var(--radius-lg);
  margin-bottom:10px;
}

/* Source grid */
.imp-sources { margin-top:14px; }
.imp-source-grid {
  display:grid; grid-template-columns:repeat(3,1fr); gap:6px;
}
.imp-source {
  display:flex; align-items:center; gap:7px; padding:8px 10px;
  background:var(--bg-secondary); border:0.5px solid var(--border);
  border-radius:var(--radius); font-size:13.2px; color:var(--text-muted);
}
.imp-source i { font-size:16.5px; flex-shrink:0; }

/* Section label */
.imp-section-label {
  font-size:13.2px; font-weight:600; color:var(--text-muted);
  display:flex; align-items:center; gap:6px; margin-bottom:10px;
}

/* Footer */
.imp-footer {
  display:flex; align-items:center; gap:10px;
  margin-top:16px; padding-top:14px;
  border-top:0.5px solid var(--border);
}
.imp-footer .btn-primary { margin-left:auto; }

/* Map summary */
.imp-map-summary {
  display:flex; align-items:center; gap:8px;
  padding:9px 13px; background:var(--bg-secondary);
  border:0.5px solid var(--border); border-radius:var(--radius-lg);
  font-size:14.3px; flex-wrap:wrap;
}

/* Map table */
.imp-map-wrap {
  overflow-y:auto; max-height:260px;
  border:0.5px solid var(--border); border-radius:var(--radius-lg);
  margin-bottom:0;
}
.imp-map-table { width:100%; border-collapse:collapse; font-size:14.3px; }
.imp-map-table th {
  text-align:left; padding:8px 12px; font-size:11px; font-weight:600;
  color:var(--text-muted); border-bottom:0.5px solid var(--border);
  text-transform:uppercase; letter-spacing:.05em;
  background:var(--bg-secondary); position:sticky; top:0; z-index:1;
}
.imp-map-table td { padding:7px 12px; border-bottom:0.5px solid var(--border); }
.imp-map-table tr:last-child td { border-bottom:none; }
.imp-map-table .imp-mapped-row td { background:#EEEDFE18; }
.imp-sel {
  width:100%; height:33px; padding:0 10px;
  border:0.5px solid var(--border-strong); border-radius:var(--radius);
  font-size:13.2px; background:var(--bg-card); color:var(--text);
  outline:none; font-family:var(--font); cursor:pointer; transition:border .15s;
}
.imp-sel:focus { border-color:var(--primary); }

/* Result */
.imp-result {
  text-align:center; padding:24px 20px;
  border-radius:var(--radius-lg); margin-bottom:16px;
}
.imp-result i { font-size:57.2px; display:block; margin-bottom:12px; }
.imp-result-ok  { background:#E1F5EE; border:0.5px solid #a0dfc0; }
.imp-result-ok  i { color:#1D9E75; }
.imp-result-err { background:var(--danger-light); border:0.5px solid #f0a090; }
.imp-result-err i { color:var(--danger); }
.imp-result-title { font-size:19.8px; font-weight:700; margin-bottom:6px; }
.imp-result-sub   { font-size:14.3px; color:var(--text-muted); }

/* Stats row */
.imp-stats {
  display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:12px;
}
.imp-stat {
  text-align:center; padding:14px;
  background:var(--bg-secondary); border:0.5px solid var(--border);
  border-radius:var(--radius-lg);
}
.imp-stat-n { font-size:30.8px; font-weight:700; line-height:1; }
.imp-stat-l { font-size:12.1px; color:var(--text-muted); margin-top:4px; }

/* Make modal wider for import */
.modal-overlay.open .modal-box { width: 620px; }

/* Hide the default modal footer when import wizard is active */
.imp-wrap ~ .modal-footer,
#modal-body .imp-wrap + .modal-footer { display:none !important; }

/* ═══════════════════════════════════════
   ADMIN TABS
═══════════════════════════════════════ */
.admin-tabs {
  display: flex; gap: 4px;
  margin-bottom: 18px;
  border-bottom: 0.5px solid var(--border);
  padding-bottom: 0;
}
.admin-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px; font-size: 14.3px; font-weight: 500;
  cursor: pointer; border: none; background: transparent;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -0.5px; transition: all .15s; font-family: var(--font);
}
.admin-tab i { font-size: 16.5px; }
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }


/* ═══════════════════════════════════════════════
   PICKLIST MANAGER
═══════════════════════════════════════════════ */

/* Grid of picklist cards */
.pl-group-lbl {
  font-size: 12.1px; font-weight: 600; color: var(--text-subtle);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 10px;
}
.pl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px; margin-bottom: 6px;
}
.pl-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 15px;
  transition: border-color .15s;
}
.pl-card:hover { border-color: var(--border-strong); }
.pl-card-head {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 8px; margin-bottom: 4px;
}
.pl-card-name { font-size: 15.4px; font-weight: 600; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.pl-chip {
  font-size: 12.1px; padding: 2px 9px; border-radius: 99px;
  background: var(--bg-secondary); color: var(--text-muted);
  border: 0.5px solid var(--border);
}
.pl-chip-more {
  font-size: 12.1px; padding: 2px 9px; border-radius: 99px;
  background: var(--primary-light); color: var(--primary); font-weight: 500;
}

/* Editor — option rows */
.pl-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: var(--radius);
  border: 1.5px solid transparent; margin-bottom: 3px;
  transition: background .1s; cursor: grab;
  background: var(--bg-card);
}
.pl-row:hover { background: var(--bg-secondary); }
.pl-row.pl-over { border-color: var(--primary); background: var(--primary-light); }

/* The text input inside each row */
.pl-opt-in {
  flex: 1; height: 36px; padding: 0 11px;
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 14.3px; background: var(--bg-card); color: var(--text);
  outline: none; font-family: var(--font);
  transition: border .15s;
}
.pl-opt-in:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(83,74,183,.08); }

/* Delete button per row */
.pl-del-btn {
  width: 30px; height: 30px; border-radius: var(--radius); border: none;
  background: transparent; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  color: var(--text-subtle); transition: all .15s; flex-shrink: 0;
}
.pl-del-btn:hover { background: var(--danger-light); color: var(--danger-text); }

/* Admin tabs */
.admin-tabs {
  display: flex; gap: 4px; margin-bottom: 18px;
  border-bottom: 0.5px solid var(--border);
}
.admin-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px; font-size: 14.3px; font-weight: 500;
  cursor: pointer; border: none; background: transparent;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -0.5px; transition: all .15s; font-family: var(--font);
}
.admin-tab i { font-size: 16.5px; }
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ═══════════════════════════════════════════════
   PICKLIST SIDE PANEL (from Layout Editor)
═══════════════════════════════════════════════ */
#pl-side-panel {
  position: fixed; inset: 0; z-index: 800;
  display: flex; justify-content: flex-end;
}
.pl-sp-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.3);
}
.pl-sp-box {
  position: relative; width: 420px; max-width: 96vw;
  background: var(--bg-card); display: flex; flex-direction: column;
  height: 100vh; box-shadow: -6px 0 30px rgba(0,0,0,.15);
  animation: slideInRight .22s ease;
}
.pl-sp-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 0.5px solid var(--border);
  gap: 10px; flex-shrink: 0;
}
.pl-sp-title {
  font-size: 16.5px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
.pl-sp-title i { color: #BA7517; font-size: 18.7px; }
.pl-sp-sub { font-size: 13.2px; color: var(--text-muted); margin-top: 4px; }
.pl-sp-close {
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: var(--bg-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 17.6px; flex-shrink: 0;
  transition: all .15s;
}
.pl-sp-close:hover { background: var(--danger-light); color: var(--danger-text); }

.pl-sp-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 14px;
}

/* Options list */
.pl-sp-list {
  border: 0.5px solid var(--border); border-radius: var(--radius-lg);
  min-height: 60px; padding: 6px;
  background: var(--bg-secondary);
}
.pl-sp-empty {
  text-align: center; padding: 24px;
  color: var(--text-subtle); font-size: 14.3px;
}
.pl-sp-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 7px; border-radius: var(--radius);
  border: 1.5px solid transparent; margin-bottom: 3px;
  background: var(--bg-card); transition: all .1s; cursor: grab;
}
.pl-sp-row:hover { background: var(--bg-card); box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.pl-sp-row.plsp-over { border-color: var(--primary); background: var(--primary-light); }
.pl-sp-opt {
  flex: 1; height: 34px; padding: 0 10px;
  border: 0.5px solid var(--border-strong); border-radius: var(--radius);
  font-size: 14.3px; background: var(--bg-card); color: var(--text);
  outline: none; font-family: var(--font); transition: border .15s;
}
.pl-sp-opt:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(83,74,183,.08); }

/* Add single */
.pl-sp-add {
  display: flex; gap: 8px;
}
.pl-sp-input {
  flex: 1; height: 38px; padding: 0 12px;
  border: 0.5px solid var(--border-strong); border-radius: var(--radius);
  font-size: 14.3px; background: var(--bg-card); color: var(--text);
  outline: none; font-family: var(--font); transition: border .15s;
}
.pl-sp-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(83,74,183,.08); }

/* Bulk add */
.pl-sp-bulk-wrap {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px; background: var(--bg-secondary);
  border: 0.5px solid var(--border); border-radius: var(--radius-lg);
}
.pl-sp-bulk-label {
  font-size: 13.2px; font-weight: 500; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.pl-sp-bulk {
  width: 100%; padding: 8px 11px;
  border: 0.5px solid var(--border-strong); border-radius: var(--radius);
  font-size: 14.3px; background: var(--bg-card); color: var(--text);
  outline: none; font-family: var(--font); resize: vertical;
  transition: border .15s;
}
.pl-sp-bulk:focus { border-color: var(--primary); }

/* Footer */
.pl-sp-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 20px; border-top: 0.5px solid var(--border);
  flex-shrink: 0; flex-wrap: wrap;
}
.pl-sp-count {
  font-size: 13.2px; color: var(--text-muted);
  background: var(--bg-secondary); border: 0.5px solid var(--border);
  border-radius: 99px; padding: 2px 10px;
}

/* Picklist ctx item visibility controlled by JS */
#ctx-picklist-item { display: none; } /* hidden until showCtxMenu runs */

/* ═══════════════════════════════════════════════
   LEAD CONVERSION MODAL
═══════════════════════════════════════════════ */
.conv-wrap { display:flex; flex-direction:column; }

/* Lead summary bar */
.conv-lead-summary {
  display:flex; align-items:center; gap:13px;
  padding:14px 16px; background:var(--bg-secondary);
  border:0.5px solid var(--border); border-radius:var(--radius-lg);
  margin-bottom:18px;
}
.conv-lead-avatar {
  width:44px; height:44px; border-radius:50%;
  background:var(--primary-light); color:var(--primary);
  display:flex; align-items:center; justify-content:center;
  font-size:17.6px; font-weight:700; flex-shrink:0;
}
.conv-lead-info { flex:1; min-width:0; }
.conv-lead-name { font-size:16.5px; font-weight:600; margin-bottom:4px; }
.conv-lead-meta { display:flex; flex-wrap:wrap; gap:10px; font-size:13.2px; color:var(--text-muted); }
.conv-lead-meta span { display:flex; align-items:center; gap:4px; }
.conv-lead-status { text-align:center; flex-shrink:0; }

/* Steps */
.conv-steps { display:flex; flex-direction:column; gap:0; }
.conv-arrow { text-align:center; padding:4px 0; color:var(--text-subtle); font-size:17.6px; }

.conv-step {
  border:0.5px solid var(--border); border-radius:var(--radius-lg);
  overflow:hidden; transition:border-color .15s;
}
.conv-step:hover { border-color:var(--border-strong); }
.conv-step.conv-step-disabled { opacity:.55; }

.conv-step-header {
  display:flex; align-items:center; gap:10px;
  padding:12px 14px; cursor:pointer;
  background:var(--bg-card); -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;
}
.conv-step-header:hover { background:var(--bg-secondary); }

.conv-step-check input[type=checkbox] {
  width:17px; height:17px; accent-color:var(--primary); cursor:pointer; flex-shrink:0;
}
.conv-step-icon {
  width:36px; height:36px; border-radius:9px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:18.7px;
}
.conv-step-title { flex:1; }
.conv-chevron { color:var(--text-subtle); transition:transform .2s; flex-shrink:0; }

.conv-step-body {
  padding:14px 14px 16px;
  border-top:0.5px solid var(--border);
  background:var(--bg-secondary);
}

/* Form grid inside step */
.conv-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.conv-field { display:flex; flex-direction:column; gap:5px; }
.conv-field label { font-size:12.1px; font-weight:500; color:var(--text-muted); }
.conv-field input,
.conv-field select {
  height:36px; padding:0 11px;
  border:0.5px solid var(--border-strong); border-radius:var(--radius);
  font-size:14.3px; background:var(--bg-card); color:var(--text);
  outline:none; font-family:var(--font); transition:border .15s;
}
.conv-field input:focus,
.conv-field select:focus { border-color:var(--primary); box-shadow:0 0 0 2px rgba(83,74,183,.08); }

/* Existing warning */
.conv-existing-warn {
  display:flex; align-items:center; flex-wrap:wrap; gap:6px;
  padding:9px 12px; background:var(--warning-light);
  border:0.5px solid #e8c87a; border-radius:var(--radius);
  font-size:13.2px; color:#854F0B; margin-bottom:12px;
}
.conv-existing-warn i { font-size:15.4px; flex-shrink:0; }

/* Footer */
.conv-footer {
  display:flex; justify-content:flex-end; gap:9px;
  margin-top:18px; padding-top:14px;
  border-top:0.5px solid var(--border);
}

/* Success results */
.conv-results { display:flex; flex-direction:column; gap:10px; }
.conv-result-card {
  display:flex; align-items:center; gap:12px;
  padding:12px 14px; background:var(--bg-secondary);
  border:0.5px solid var(--border); border-radius:var(--radius-lg);
  transition:border-color .15s;
}
.conv-result-card:hover { border-color:var(--border-strong); }
.conv-result-icon {
  width:38px; height:38px; border-radius:9px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:19.8px;
}
.conv-result-info { flex:1; }
.conv-result-type { font-size:12.1px; color:var(--text-muted); font-weight:500; text-transform:uppercase; letter-spacing:.06em; }
.conv-result-name { font-size:15.4px; font-weight:600; margin-top:2px; }

/* Wider modal for conversion */
.modal-overlay.open .modal-box { max-width: 640px; }

/* Pick List badge in editor field */
.ed-field-pl-badge {
  font-size: 11px; padding: 1px 6px; border-radius: 99px;
  background: #FAEEDA; color: #854F0B;
  border: 0.5px solid #e8c87a; margin-left: 4px;
  font-weight: 500; flex-shrink: 0;
}

/* ── PROBABILITY BAR ─────────────────────────── */
.prob-bar-wrap {
  width: 80px; height: 8px; background: var(--bg-secondary);
  border-radius: 99px; overflow: hidden; flex-shrink: 0;
  border: 0.5px solid var(--border);
}
.prob-bar-fill {
  height: 100%; border-radius: 99px;
  background: #BA7517;
  transition: width .3s ease, background .3s ease;
}
.prob-pct {
  font-size: 13.2px; font-weight: 600; color: var(--text-muted);
  min-width: 36px; text-align: right; flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   ORDER PDF FORM
═══════════════════════════════════════════════ */
.pdf-form-wrap { display:flex; flex-direction:column; }

/* Tabs */
.pdf-tabs {
  display:flex; gap:2px; margin-bottom:16px;
  border-bottom:0.5px solid var(--border); padding-bottom:0;
}
.pdf-tab {
  display:flex; align-items:center; gap:6px;
  padding:8px 13px; font-size:13.2px; font-weight:500;
  cursor:pointer; border:none; background:transparent;
  color:var(--text-muted); border-bottom:2px solid transparent;
  margin-bottom:-0.5px; transition:all .15s; font-family:var(--font);
}
.pdf-tab i { font-size:15.4px; }
.pdf-tab:hover { color:var(--text); }
.pdf-tab.active { color:var(--primary); border-bottom-color:var(--primary); }

.pdf-tab-body { display:none; }
.pdf-tab-body.active { display:block; }

.pdf-section-label {
  font-size:12.1px; font-weight:600; color:var(--text-subtle);
  text-transform:uppercase; letter-spacing:.07em; margin-bottom:10px;
}
.pdf-grid {
  display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:4px;
}
.pdf-field { display:flex; flex-direction:column; gap:4px; }
.pdf-field.full { grid-column:span 2; }
.pdf-field label { font-size:12.1px; font-weight:500; color:var(--text-muted); }
.pdf-field input, .pdf-field textarea {
  height:36px; padding:0 11px;
  border:0.5px solid var(--border-strong); border-radius:var(--radius);
  font-size:14.3px; background:var(--bg-card); color:var(--text);
  outline:none; font-family:var(--font); transition:border .15s;
}
.pdf-field input:focus, .pdf-field textarea:focus {
  border-color:var(--primary); box-shadow:0 0 0 2px rgba(83,74,183,.08);
}
.pdf-field textarea { height:auto; padding:8px 11px; }

/* Line item rows */
.pdf-item-row {
  display:flex; align-items:center; gap:8px;
  padding:8px 10px; background:var(--bg-card);
  border:0.5px solid var(--border); border-radius:var(--radius-lg);
  margin-bottom:7px; transition:border-color .15s;
}
.pdf-item-row:hover { border-color:var(--border-strong); }
.pdf-item-grip { color:var(--text-subtle); cursor:grab; flex-shrink:0; }
.pdf-item-in {
  width:100%; height:34px; padding:0 9px;
  border:0.5px solid var(--border-strong); border-radius:var(--radius);
  font-size:13.2px; background:var(--bg-card); color:var(--text);
  outline:none; font-family:var(--font); transition:border .15s;
}
.pdf-item-in:focus { border-color:var(--primary); }
.pdf-item-total {
  font-size:13.2px; font-weight:600; color:var(--primary);
  min-width:70px; text-align:right; flex-shrink:0;
}

/* Totals preview */
.pdf-total-table {
  margin-top:14px; border:0.5px solid var(--border);
  border-radius:var(--radius-lg); overflow:hidden; max-width:300px;
}
.pdf-total-row {
  display:flex; justify-content:space-between; align-items:center;
  padding:7px 14px; font-size:14.3px; border-bottom:0.5px solid var(--border);
}
.pdf-total-row:last-child { border-bottom:none; }
.pdf-total-row.grand {
  background:var(--primary); color:#fff; font-weight:700; font-size:15.4px;
}
.pdf-total-row.grand span { color:#fff; }

/* Footer */
.pdf-form-footer {
  display:flex; justify-content:flex-end; gap:9px;
  margin-top:16px; padding-top:14px;
  border-top:0.5px solid var(--border);
}

/* Wider modal for PDF form */
.modal-overlay.open .modal-box { width:660px; }

/* ═══════════════════════════════════════════════
   MULTI-TENANT LOGIN
═══════════════════════════════════════════════ */
.ws-header {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px; margin-bottom: 4px;
  border-bottom: 0.5px solid var(--border);
}
.ws-back-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 0.5px solid var(--border-strong); background: var(--bg-secondary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16.5px; color: var(--text-muted); transition: all .15s;
}
.ws-back-btn:hover { background: var(--bg); color: var(--text); }
.ws-badge {
  display: flex; align-items: center; gap: 7px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 99px; padding: 5px 13px; font-size: 14.3px; font-weight: 500;
  border: 0.5px solid rgba(244,123,32,.18);
}

/* ═══════════════════════════════════════════════
   SUPER ADMIN DASHBOARD
═══════════════════════════════════════════════ */
.sa-layout {
  display: flex; height: 100%; overflow: hidden;
}
.sa-sidebar {
  width: 220px; background: #0F172A; display: flex;
  flex-direction: column; flex-shrink: 0;
}
.sa-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 14px; border-bottom: 0.5px solid rgba(255,255,255,.08);
}
.sa-brand-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: #534AB7; display: flex; align-items: center;
  justify-content: center; font-size: 18.7px; color: #fff; flex-shrink: 0;
}
.sa-brand-name { font-size: 16.5px; font-weight: 600; color: #fff; }
.sa-brand-sub  { font-size: 11px; color: #6366f1; font-weight: 500; letter-spacing: .06em; margin-top: 1px; }
.sa-nav { flex: 1; padding: 8px 6px; overflow-y: auto; }
.sa-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14.3px; color: #9ca3af; transition: all .15s; margin-bottom: 2px;
}
.sa-item i { font-size: 17.6px; flex-shrink: 0; }
.sa-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.sa-item.active { background: rgba(83,74,183,.25); color: #7B72E9; font-weight: 500; }
.sa-item.muted { color: #6b7280; }
.sa-footer { padding: 6px 6px 10px; border-top: 0.5px solid rgba(255,255,255,.06); }

.sa-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.sa-topbar {
  height: 52px; background: #fff; border-bottom: 0.5px solid var(--border);
  display: flex; align-items: center; padding: 0 22px; gap: 12px; flex-shrink: 0;
}
.sa-title { font-size: 17.6px; font-weight: 600; flex: 1; }
.sa-user  { font-size: 14.3px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.sa-content { flex: 1; overflow-y: auto; padding: 20px; }
.sa-page { display: none; }
.sa-page.active { display: block; }

.sa-metrics {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 10px; margin-bottom: 16px;
}
.sa-metric {
  background: var(--bg-card); border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 12px; text-align: center;
}
.sa-metric-val { font-size: 26.4px; font-weight: 700; }
.sa-metric-lbl { font-size: 12.1px; color: var(--text-muted); margin-top: 4px; }

/* Tenant badge in CRM sidebar */
.sb-tenant-badge {
  margin: 6px 8px 2px;
  padding: 6px 10px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 7px;
  font-size: 12.1px; color: var(--primary); font-weight: 500;
  border: 0.5px solid rgba(244,123,32,.18);
}
.sb-tenant-plan {
  margin-left: auto; font-size: 11px; padding: 1px 7px;
  background: rgba(83,74,183,.12); border-radius: 99px;
  color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
}

/* ═══════════════════════════════════════════════
   VONAGE PHONE INTEGRATION
═══════════════════════════════════════════════ */

/* ── FAB button ─────────────────────────────── */
#vonage-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 600;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24.2px; cursor: pointer;
  box-shadow: 0 4px 18px rgba(83,74,183,.45);
  transition: transform .15s, box-shadow .15s;
}
#vonage-fab:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(83,74,183,.55); }

/* ── Dialer panel ────────────────────────────── */
#vonage-dialer {
  position: fixed; bottom: 90px; right: 28px; z-index: 700;
  width: 320px; background: var(--bg-card);
  border: 0.5px solid var(--border); border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
  overflow: hidden; display: flex; flex-direction: column;
  max-height: 580px;
}

.vd-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--primary);
  cursor: grab; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; flex-shrink: 0;
}
.vd-brand { font-size: 14.3px; font-weight: 600; color: #fff; flex: 1; display: flex; align-items: center; gap: 6px; }
.vd-brand i { font-size: 16.5px; }
.vd-close { width: 24px; height: 24px; border: none; background: rgba(255,255,255,.2); color: #fff; border-radius: 50%; cursor: pointer; font-size: 17.6px; display: flex; align-items: center; justify-content: center; line-height: 1; flex-shrink: 0; }
.vd-close:hover { background: rgba(255,255,255,.35); }

.vd-tab-btn { border: none; background: rgba(255,255,255,.18); color: #fff; border-radius: 6px; padding: 3px 9px; font-size: 12.1px; font-weight: 500; cursor: pointer; font-family: var(--font); transition: all .15s; }
.vd-tab-btn.active { background: rgba(255,255,255,.45); }
.vd-tab-btn:hover  { background: rgba(255,255,255,.3); }

.vd-tab { display: none; overflow-y: auto; flex: 1; }
.vd-tab.active { display: flex; flex-direction: column; }

/* ── Dial tab ──────────────────────────────── */
#vd-dial { padding: 14px; gap: 10px; }
.vd-input {
  width: 100%; height: 36px; padding: 0 11px;
  border: 0.5px solid var(--border-strong); border-radius: var(--radius);
  font-size: 14.3px; background: var(--bg-card); color: var(--text);
  outline: none; font-family: var(--font); transition: border .15s; box-sizing: border-box;
}
.vd-input:focus { border-color: var(--primary); }
textarea.vd-input { height: auto; padding: 8px 11px; }

.vd-numpad { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top:4px; }
.vd-key {
  height: 42px; border: 0.5px solid var(--border); border-radius: 10px;
  background: var(--bg-secondary); font-size: 18.7px; font-weight: 500;
  cursor: pointer; transition: all .12s; font-family: var(--font); color: var(--text);
}
.vd-key:hover  { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.vd-key:active { transform: scale(.94); }

.vd-actions { display: flex; gap: 8px; margin-top: 8px; }
.vd-call-btn {
  flex: 1; height: 42px; border: none; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 15.4px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 7px; font-family: var(--font); transition: all .15s;
}
.vd-call-btn:hover { background: #4339a0; }
.vd-call-btn i { font-size: 18.7px; }

.vd-warn { font-size: 12.1px; color: #BA7517; background: #FAEEDA; border-radius: 7px; padding: 7px 10px; display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.vd-warn a { color: var(--primary); cursor: pointer; font-weight: 600; }

/* ── Active call ────────────────────────────── */
.vd-active-call {
  background: linear-gradient(135deg,#1a1a2e,#0F172A);
  border-radius: 12px; padding: 16px; display: flex; align-items: center;
  gap: 12px; margin-bottom: 10px;
}
.vd-call-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 17.6px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.vd-call-info { flex: 1; min-width: 0; }
.vd-call-name { font-size: 15.4px; font-weight: 600; color: #fff; }
.vd-call-num  { font-size: 13.2px; color: #9ca3af; margin-top: 1px; }
.vd-call-timer { font-size: 24.2px; font-weight: 700; color: #1D9E75; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.vd-call-status { display: flex; align-items: center; gap: 6px; font-size: 12.1px; color: #9ca3af; }
.vd-pulse { width: 8px; height: 8px; border-radius: 50%; background: #1D9E75; animation: pulse 1.2s ease-in-out infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.3)} }

.vd-call-controls { display: flex; flex-direction: column; gap: 6px; }
.vd-hangup-btn { height: 34px; padding: 0 12px; border: none; border-radius: 8px; background: #EF4444; color: #fff; font-size: 13.2px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 5px; font-family: var(--font); }
.vd-hangup-btn:hover { background: #DC2626; }
.vd-missed-btn { height: 34px; padding: 0 12px; border: 0.5px solid #4B5563; border-radius: 8px; background: transparent; color: #9ca3af; font-size: 13.2px; cursor: pointer; display: flex; align-items: center; gap: 5px; font-family: var(--font); }
.vd-missed-btn:hover { background: rgba(255,255,255,.06); }

/* ── Log tab ─────────────────────────────────── */
#vd-log { padding: 6px; }
.vd-log-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; cursor: pointer; transition: background .12s;
}
.vd-log-row:hover { background: var(--bg-secondary); }
.vd-log-icon { font-size: 22px; flex-shrink: 0; }
.vd-log-info { flex: 1; min-width: 0; }
.vd-log-name { font-size: 14.3px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-log-meta { font-size: 12.1px; color: #9ca3af; margin-top: 1px; }

/* ── Manual + Settings tabs ─────────────────── */
#vd-manual   { padding: 14px; gap: 8px; }
#vd-settings { overflow-y: auto; }
.vd-settings-scroll { padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.vd-settings-title { font-size: 12.1px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; }
.vd-manual-form { display: flex; flex-direction: column; gap: 9px; }
.vd-field { display: flex; flex-direction: column; gap: 4px; }
.vd-field label { font-size: 12.1px; font-weight: 500; color: var(--text-muted); }

.vd-webhook-box { background: var(--bg-secondary); border: 0.5px solid var(--border); border-radius: 9px; padding: 10px 12px; }
.vd-webhook-url { font-size: 11px; color: var(--primary); font-family: 'Courier New', monospace; word-break: break-all; cursor: pointer; padding: 4px 7px; background: var(--primary-light); border-radius: 5px; }
.vd-webhook-url:hover { opacity: .8; }

/* ── Empty/loading states ─────────────────── */
.vd-loading { display: flex; align-items: center; justify-content: center; padding: 30px; color: var(--text-subtle); font-size: 24.2px; }
.vd-loading i { animation: spin 1s linear infinite; }
.vd-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 20px; color: var(--text-subtle); font-size: 14.3px; }
.vd-empty i { font-size: 30.8px; }

/* ── Call button on table rows ─────────────── */
.btn-call {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; height: 28px; border-radius: 7px;
  background: #FEF0E6; color: var(--primary); border: 1px solid rgba(244,123,32,.3);
  font-size: 12.1px; font-weight: 600; cursor: pointer;
  font-family: var(--font); transition: all .15s; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(244,123,32,.1);
}
.btn-call:hover { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(244,123,32,.35); }
.btn-call i { font-size: 13.2px; }

/* ── Call log in detail panel ────────────── */
.call-log-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 0.5px solid var(--border);
}
.call-log-item:last-child { border-bottom: none; }
.call-log-avatar { font-size: 22px; flex-shrink: 0; }
.call-log-info { flex: 1; min-width: 0; }

/* ═══════════════════════════════════════════════
   XLITE PHONE INTEGRATION
═══════════════════════════════════════════════ */

/* XLite FAB — single phone button */
#xlite-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 600;
  width: 52px; height: 52px; border-radius: 50%;
  background: #0F6E56; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24.2px; cursor: pointer;
  box-shadow: 0 4px 18px rgba(15,110,86,.45);
  transition: transform .15s, box-shadow .15s;
}
#xlite-fab:hover { transform: scale(1.08); box-shadow: 0 6px 22px rgba(15,110,86,.55); }

/* Panel */
#xlite-panel {
  position: fixed; bottom: 90px; right: 28px; z-index: 700;
  width: 310px; background: var(--bg-card);
  border: 0.5px solid var(--border); border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
  overflow: hidden; display: flex; flex-direction: column;
  max-height: 560px;
}
.xlite-header {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px; background: #0F6E56; cursor: grab; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}
.xlite-brand { display:flex; align-items:center; gap:6px; flex:1; font-size:14.3px; font-weight:600; color:#fff; }
.xlite-brand i { font-size:16.5px; }
.xlite-ws-badge { font-size:11px; margin-left:4px; }
.xlite-close { width:24px; height:24px; border:none; background:rgba(255,255,255,.2); color:#fff; border-radius:50%; cursor:pointer; font-size:17.6px; display:flex; align-items:center; justify-content:center; }
.xlite-close:hover { background:rgba(255,255,255,.35); }
.xlite-tab-btn { border:none; background:rgba(255,255,255,.18); color:#fff; border-radius:6px; padding:3px 8px; font-size:12.1px; font-weight:500; cursor:pointer; font-family:var(--font); transition:all .15s; }
.xlite-tab-btn.active { background:rgba(255,255,255,.45); }
.xlite-tab-btn:hover  { background:rgba(255,255,255,.3); }

/* Active call bar */
#xlite-active-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #0d1a0d;
  border-bottom: 0.5px solid rgba(15,110,86,.4);
}
.xlite-active-icon { font-size: 24.2px; flex-shrink: 0; }
.xlite-timer { font-size: 19.8px; font-weight: 700; color: #1D9E75; margin-top: 2px; font-variant-numeric: tabular-nums; }
.xlite-end-btn  { height:30px; padding:0 10px; border:none; border-radius:7px; background:#EF4444; color:#fff; font-size:12.1px; font-weight:600; cursor:pointer; font-family:var(--font); }
.xlite-miss-btn { height:30px; padding:0 10px; border:0.5px solid #4B5563; border-radius:7px; background:transparent; color:#9ca3af; font-size:12.1px; cursor:pointer; font-family:var(--font); }

/* Tabs */
.xlite-tab { display:none; overflow-y:auto; flex:1; }
.xlite-tab.active { display:flex; flex-direction:column; }

/* Form */
.xlite-form { padding:12px; display:flex; flex-direction:column; gap:8px; }
.xlite-field { display:flex; flex-direction:column; gap:4px; }
.xlite-field label { font-size:11px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; }
.xlite-input {
  width:100%; height:34px; padding:0 10px;
  border:0.5px solid var(--border-strong); border-radius:var(--radius);
  font-size:13.2px; background:var(--bg-card); color:var(--text);
  outline:none; font-family:var(--font); box-sizing:border-box; transition:border .15s;
}
.xlite-input:focus { border-color:#0F6E56; }
textarea.xlite-input { height:auto; padding:7px 10px; }
.xlite-save-btn {
  height:38px; border:none; border-radius:9px;
  background:#0F6E56; color:#fff; font-size:14.3px; font-weight:600;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  gap:6px; font-family:var(--font); transition:all .15s; margin-top:4px;
}
.xlite-save-btn:hover { background:#0a5440; }

/* Log */
#xlt-tab-log { padding:4px; }
.xlite-log-row {
  display:flex; align-items:center; gap:9px;
  padding:8px 10px; border-radius:8px; cursor:pointer; transition:background .12s;
}
.xlite-log-row:hover { background:var(--bg-secondary); }
.xlite-log-icon { font-size:19.8px; flex-shrink:0; }
.xlite-log-info { flex:1; min-width:0; }
.xlite-log-name { font-size:13.2px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.xlite-log-meta { font-size:11px; color:#9ca3af; }

/* Settings */
#xlt-tab-settings { overflow-y:auto; }
.xlite-webhook-box { background:var(--bg-secondary); border:0.5px solid var(--border); border-radius:9px; padding:10px 12px; margin-top:4px; }
.xlite-webhook-url { font-size:11px; color:#0F6E56; font-family:'Courier New',monospace; word-break:break-all; cursor:pointer; padding:5px 8px; background:#E1F5EE; border-radius:5px; margin-top:3px; }
.xlite-webhook-url:hover { opacity:.8; }
.xlite-howto { background:var(--primary-light); border:0.5px solid rgba(244,123,32,.18); border-radius:9px; padding:10px 12px; margin-top:4px; }

/* Loading / empty */
.xlite-loading { display:flex; align-items:center; justify-content:center; padding:28px; color:var(--text-subtle); font-size:22px; }
.xlite-loading i { animation:spin 1s linear infinite; }
.xlite-empty { display:flex; flex-direction:column; align-items:center; gap:6px; padding:24px 16px; color:var(--text-subtle); font-size:13.2px; text-align:center; }
.xlite-empty i { font-size:28.6px; }

/* Incoming call notification */
#xlite-call-notif {
  position: fixed; bottom: 28px; left: 28px; z-index: 900;
  background: #0F172A; border: 1px solid #1D9E75;
  border-radius: 16px; padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  min-width: 270px; max-width: 320px;
  animation: slideInLeft .3s ease;
}
@keyframes slideInLeft { from { transform:translateX(-120%); opacity:0; } to { transform:none; opacity:1; } }
.xlite-notif-icon { font-size: 35.2px; flex-shrink: 0; }
.xlite-notif-info { flex: 1; min-width: 0; }
.xlite-notif-label { font-size: 11px; font-weight: 600; color: #1D9E75; text-transform: uppercase; letter-spacing: .06em; }
.xlite-notif-name  { font-size: 16.5px; font-weight: 700; color: #fff; margin: 2px 0; }
.xlite-notif-num   { font-size: 13.2px; color: #9ca3af; }
.xlite-notif-view  { margin-top: 8px; height: 28px; padding: 0 10px; border: 0.5px solid #1D9E75; border-radius: 7px; background: rgba(29,158,117,.15); color: #1D9E75; font-size: 12.1px; font-weight: 600; cursor: pointer; font-family: var(--font); display: inline-flex; align-items: center; gap: 5px; }
.xlite-notif-view:hover { background: rgba(29,158,117,.3); }
.xlite-notif-nomatch { font-size: 12.1px; color: #6b7280; margin-top: 6px; }
.xlite-notif-close { width: 24px; height: 24px; border: none; background: rgba(255,255,255,.1); color: #9ca3af; border-radius: 50%; cursor: pointer; font-size: 17.6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.xlite-notif-close:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ── XLite Dial Tab ─────────────────────────── */
.xlite-numpad {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 4px 0;
}
.xlite-key {
  height: 40px; border: 0.5px solid var(--border); border-radius: 9px;
  background: var(--bg-secondary); font-size: 17.6px; font-weight: 500;
  cursor: pointer; transition: all .12s; font-family: var(--font); color: var(--text);
}
.xlite-key:hover  { background: #E1F5EE; border-color: #0F6E56; color: #0F6E56; }
.xlite-key:active { transform: scale(.94); }

.xlite-call-btn {
  height: 42px; border: none; border-radius: 10px;
  background: #0F6E56; color: #fff; font-size: 15.4px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 7px; font-family: var(--font); transition: all .15s; margin-top: 2px;
}
.xlite-call-btn:hover { background: #0a5440; }
.xlite-call-btn i { font-size: 18.7px; }

.xlite-dial-hint {
  font-size: 12.1px; color: var(--text-subtle);
  display: flex; align-items: center; gap: 5px;
  justify-content: center; margin-top: 4px;
}

.xlite-warn {
  font-size: 12.1px; color: #BA7517; background: #FAEEDA;
  border-radius: 7px; padding: 7px 10px;
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
}

/* ── XLite FAB shows even when not configured ─ */
#xlite-fab { display: flex !important; }

/* ═══════════════════════════════════════════════
   VONAGE PHONE PANEL
═══════════════════════════════════════════════ */
#vonage-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 600;
  width: 52px; height: 52px; border-radius: 50%;
  background: #E4135A; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24.2px; cursor: pointer;
  box-shadow: 0 4px 18px rgba(228,19,90,.45);
  transition: transform .15s, box-shadow .15s;
}
#vonage-fab:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(228,19,90,.55); }

#vonage-panel {
  position: fixed; bottom: 90px; right: 28px; z-index: 700;
  width: 320px; background: var(--bg-card);
  border: 0.5px solid var(--border); border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
  overflow: hidden; display: flex; flex-direction: column;
  max-height: 580px;
}

.von-header {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px; background: #E4135A; cursor: grab; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; flex-shrink: 0;
}
.von-brand { display:flex; align-items:center; gap:6px; flex:1; font-size:14.3px; font-weight:600; color:#fff; }
.von-brand i { font-size:16.5px; }
.von-status-badge { font-size:11px; padding:2px 7px; border-radius:99px; font-weight:600; }
.von-status-badge.online  { background:rgba(255,255,255,.2); color:#fff; }
.von-status-badge.offline { background:rgba(0,0,0,.3); color:#ffb3b3; }
.von-close { width:24px; height:24px; border:none; background:rgba(255,255,255,.2); color:#fff; border-radius:50%; cursor:pointer; font-size:17.6px; display:flex; align-items:center; justify-content:center; }
.von-close:hover { background:rgba(255,255,255,.35); }
.von-tab-btn { border:none; background:rgba(255,255,255,.18); color:#fff; border-radius:6px; padding:3px 8px; font-size:12.1px; font-weight:500; cursor:pointer; font-family:var(--font); transition:all .15s; }
.von-tab-btn.active { background:rgba(255,255,255,.45); }

/* Active call bar */
#von-active-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: #1a0007;
  border-bottom: 0.5px solid rgba(228,19,90,.35); flex-shrink: 0;
}
.von-call-avatar { width:40px; height:40px; border-radius:50%; background:#E4135A; color:#fff; font-size:15.4px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.von-timer { font-size:22px; font-weight:700; color:#E4135A; margin:2px 0; font-variant-numeric:tabular-nums; }
.von-pulse-row { display:flex; align-items:center; gap:5px; font-size:12.1px; color:#9ca3af; }
.von-pulse { width:7px; height:7px; border-radius:50%; background:#E4135A; animation:pulse 1.1s ease infinite; flex-shrink:0; }
.von-end-btn  { height:30px; padding:0 10px; border:none; border-radius:7px; background:#EF4444; color:#fff; font-size:12.1px; font-weight:600; cursor:pointer; font-family:var(--font); display:flex; align-items:center; gap:4px; }
.von-miss-btn { height:30px; padding:0 10px; border:0.5px solid #4B5563; border-radius:7px; background:transparent; color:#9ca3af; font-size:12.1px; cursor:pointer; font-family:var(--font); display:flex; align-items:center; gap:4px; }

/* Tab content */
.von-tab { display:none; overflow-y:auto; flex:1; }
.von-tab.active { display:flex; flex-direction:column; }

.von-form { padding:12px; display:flex; flex-direction:column; gap:9px; }
.von-field { display:flex; flex-direction:column; gap:4px; }
.von-field label { font-size:11px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; }
.von-input {
  width:100%; height:34px; padding:0 10px;
  border:0.5px solid var(--border-strong); border-radius:var(--radius);
  font-size:13.2px; background:var(--bg-card); color:var(--text);
  outline:none; font-family:var(--font); box-sizing:border-box; transition:border .15s;
}
.von-input:focus { border-color:#E4135A; }
textarea.von-input { height:auto; padding:7px 10px; }

.von-numpad { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.von-key { height:38px; border:0.5px solid var(--border); border-radius:9px; background:var(--bg-secondary); font-size:17.6px; font-weight:500; cursor:pointer; font-family:var(--font); color:var(--text); transition:all .1s; }
.von-key:hover  { background:#FEE7EF; border-color:#E4135A; color:#E4135A; }
.von-key:active { transform:scale(.93); }

.von-call-btn {
  height:42px; border:none; border-radius:10px;
  background:#E4135A; color:#fff; font-size:14.3px; font-weight:600;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  gap:7px; font-family:var(--font); transition:all .15s;
}
.von-call-btn:hover { background:#b50f48; }
.von-call-btn:disabled { background:#9ca3af; cursor:not-allowed; }
.von-call-btn i { font-size:17.6px; }

.von-warn { font-size:12.1px; color:#BA7517; background:#FAEEDA; border-radius:7px; padding:7px 10px; display:flex; align-items:center; gap:6px; }
.von-info { font-size:12.1px; color:#185FA5; background:#E6F1FB; border-radius:7px; padding:7px 10px; display:flex; align-items:center; gap:6px; }

/* Log tab */
#vt-tab-log { padding:4px; }
.von-log-row { display:flex; align-items:center; gap:9px; padding:9px 10px; border-radius:8px; cursor:pointer; transition:background .12s; }
.von-log-row:hover { background:var(--bg-secondary); }
.von-log-icon { font-size:19.8px; flex-shrink:0; }
.von-log-info { flex:1; min-width:0; }
.von-log-name { font-size:13.2px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.von-log-meta { font-size:11px; color:#9ca3af; }

/* Settings */
.von-webhook-box { background:var(--bg-secondary); border:0.5px solid var(--border); border-radius:9px; padding:10px 12px; }
.von-webhook-url { font-size:11px; color:#E4135A; font-family:'Courier New',monospace; word-break:break-all; cursor:pointer; padding:4px 7px; background:#FEE7EF; border-radius:5px; margin-top:3px; }
.von-webhook-url:hover { opacity:.8; }
.von-howto { background:var(--primary-light); border:0.5px solid rgba(244,123,32,.18); border-radius:9px; padding:10px 12px; }

.von-loading { display:flex; align-items:center; justify-content:center; padding:28px; color:var(--text-subtle); font-size:22px; }
.von-loading i { animation:spin 1s linear infinite; }
.von-empty { display:flex; flex-direction:column; align-items:center; gap:6px; padding:24px; color:var(--text-subtle); font-size:13.2px; text-align:center; }
.von-empty i { font-size:28.6px; }

/* ═══════════════════════════════════════════════
   ZOIPER DIALER
═══════════════════════════════════════════════ */

/* ── FAB ──────────────────────────────────────── */
#zoiper-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 600;
  width: 56px; height: 56px; border-radius: 50%;
  background: #F47B20; color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; gap: 1px;
  box-shadow: 0 4px 20px rgba(244,123,32,.5);
  transition: transform .15s, box-shadow .15s;
  overflow: hidden;
}
#zoiper-fab:hover  { transform: scale(1.1); box-shadow: 0 6px 28px rgba(244,123,32,.6); }
#zoiper-fab:active { transform: scale(.95); }
#zoiper-fab i { font-size: 24.2px; }
.zoiper-fab-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(244,123,32,.35);
  animation: zoiper-ring 2s ease-in-out infinite;
}
@keyframes zoiper-ring {
  0%,100% { transform:scale(1); opacity:.6; }
  50%      { transform:scale(1.15); opacity:0; }
}

/* ── Panel ─────────────────────────────────────── */
#zoiper-panel {
  position: fixed; bottom: 96px; right: 28px; z-index: 700;
  width: 330px;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0,0,0,.22), 0 2px 8px rgba(244,123,32,.12);
  overflow: hidden; display: flex; flex-direction: column;
  max-height: 620px;
}

/* ── Header ─────────────────────────────────────── */
.zp-header {
  background: linear-gradient(135deg, #F47B20 0%, #e05f00 100%);
  flex-shrink: 0;
}
.zp-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 8px; cursor: grab;
}
.zp-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 19.8px; color: #fff; flex-shrink: 0;
}
.zp-title    { font-size: 15.4px; font-weight: 700; color: #fff; }
.zp-subtitle { font-size: 11px; color: rgba(255,255,255,.75); }
.zp-status-pill {
  margin-left: auto; display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.2); color: #fff;
  border-radius: 99px; padding: 3px 9px; font-size: 12.1px; font-weight: 600;
}
.zp-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }

.zp-tabs-row {
  display: flex; align-items: center; gap: 3px;
  padding: 0 10px 10px;
}
.zp-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 30px; border: none;
  background: rgba(255,255,255,.15); color: rgba(255,255,255,.8);
  border-radius: 8px; cursor: pointer; font-size: 12.1px; font-weight: 500;
  font-family: var(--font); transition: all .15s;
}
.zp-tab:hover  { background: rgba(255,255,255,.25); color: #fff; }
.zp-tab.active { background: rgba(255,255,255,.35); color: #fff; }
.zp-tab i { font-size: 14.3px; }
.zp-close-btn {
  width: 30px; height: 30px; border: none;
  background: rgba(0,0,0,.2); color: rgba(255,255,255,.8);
  border-radius: 8px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.zp-close-btn:hover { background: rgba(0,0,0,.35); color: #fff; }

/* ── Active call bar ─────────────────────────────── */
#zp-active-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: #1a0800;
  border-bottom: 0.5px solid rgba(244,123,32,.3);
  flex-shrink: 0;
}
.zp-av-lg {
  width: 44px; height: 44px; border-radius: 50%;
  background: #F47B20; color: #fff; font-size: 16.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.zp-active-name   { font-size: 14.3px; font-weight: 600; color: #fff; }
.zp-active-num    { font-size: 12.1px; color: #9ca3af; margin-top: 1px; }
.zp-active-timer  { font-size: 24.2px; font-weight: 700; color: #F47B20; margin: 3px 0 2px; font-variant-numeric: tabular-nums; }
.zp-active-status { display: flex; align-items: center; gap: 5px; font-size: 12.1px; color: #9ca3af; }
.zp-pulse { width: 7px; height: 7px; border-radius: 50%; background: #F47B20; animation: pulse 1.1s ease infinite; flex-shrink: 0; }
.zp-active-actions { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.zp-end-btn  {
  height: 32px; padding: 0 10px; border: none; border-radius: 8px;
  background: #EF4444; color: #fff; font-size: 12.1px; font-weight: 600;
  cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; gap: 4px;
}
.zp-miss-btn {
  height: 32px; padding: 0 10px; border: 0.5px solid #374151;
  border-radius: 8px; background: transparent; color: #9ca3af;
  font-size: 12.1px; cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; gap: 4px;
}

/* ── Tab bodies ─────────────────────────────────── */
.zp-tab-body { display: none; overflow-y: auto; flex: 1; }
.zp-tab-body.active { display: flex; flex-direction: column; }

/* ── Dial tab ─────────────────────────────────── */
.zp-display-wrap {
  padding: 14px 14px 6px;
  border-bottom: 0.5px solid var(--border);
}
.zp-display-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.zp-number-display {
  flex: 1; min-height: 42px; padding: 0 12px;
  background: var(--bg-secondary); border-radius: 10px;
  display: flex; align-items: center; cursor: text;
  border: 0.5px solid var(--border); font-variant-numeric: tabular-nums;
}
.zp-del-btn {
  width: 42px; height: 42px; border: 0.5px solid var(--border);
  border-radius: 10px; background: var(--bg-secondary);
  color: var(--text-muted); cursor: pointer; font-size: 19.8px;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.zp-del-btn:hover { background: #FCEEE4; color: #F47B20; border-color: #F47B20; }

.zp-contact-card {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; background: #E1F5EE; border-radius: 9px;
  border: 0.5px solid #a0dfc0; margin-bottom: 4px;
}
.zp-contact-av {
  width: 30px; height: 30px; border-radius: 50%;
  background: #0F6E56; color: #fff; font-size: 12.1px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.zp-contact-name  { font-size: 14.3px; font-weight: 600; color: #0F6E56; }
.zp-contact-badge { font-size: 11px; color: #1D9E75; margin-top: 1px; }

/* ── Numpad ──────────────────────────────────── */
.zp-numpad {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 8px; padding: 10px 14px;
}
.zp-key {
  height: 52px; border: 0.5px solid var(--border);
  border-radius: 12px; background: var(--bg-card);
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  transition: all .1s; font-family: var(--font);
}
.zp-key:hover  { background: #FCEEE4; border-color: #F47B20; }
.zp-key:active { transform: scale(.93); background: #FCEEE4; }
.zp-key-main { font-size: 22px; font-weight: 500; color: var(--text); line-height: 1; }
.zp-key-sub  { font-size: 8.3px; color: var(--text-subtle); letter-spacing: .5px; }

/* ── Call button row ──────────────────────────── */
.zp-call-row {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; padding: 8px 14px 14px;
}
.zp-clear-btn {
  width: 42px; height: 42px; border: 0.5px solid var(--border);
  border-radius: 50%; background: var(--bg-secondary);
  color: var(--text-muted); cursor: pointer; font-size: 17.6px;
  display: flex; align-items: center; justify-content: center; transition: all .12s;
}
.zp-clear-btn:hover { background: #FCEEE4; color: #F47B20; border-color: #F47B20; }

.zp-call-btn {
  width: 66px; height: 66px; border: none; border-radius: 50%;
  background: #F47B20; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(244,123,32,.45);
  transition: all .15s;
}
.zp-call-btn:hover  { background: #e05f00; transform: scale(1.06); }
.zp-call-btn:active { transform: scale(.94); }
.zp-call-ringing    { animation: zp-ring .5s ease-in-out 3; }
@keyframes zp-ring  { 0%,100%{transform:scale(1)} 50%{transform:scale(1.12)} }
.zp-call-icon { font-size: 28.6px; color: #fff; }

.zp-info-bar {
  margin: 0 14px 8px; padding: 7px 10px;
  background: #FCEEE4; border-radius: 8px; border: 0.5px solid #F9C79E;
  font-size: 12.1px; color: #854F0B;
  display: flex; align-items: center; gap: 6px;
}
.zp-info-bar i { font-size: 14.3px; flex-shrink: 0; }

.zp-softphones { padding: 0 14px 12px; }
.zp-sp-label   { font-size: 11px; color: var(--text-subtle); margin-bottom: 5px; }
.zp-sp-list    { display: flex; flex-wrap: wrap; gap: 5px; }
.zp-sp-tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 99px; border: 0.5px solid;
}

/* ── Log tab ─────────────────────────────────── */
#zt-tab-log { padding: 6px 0; }
.zp-log-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer; transition: background .1s;
  border-bottom: 0.5px solid var(--border);
}
.zp-log-item:last-child { border-bottom: none; }
.zp-log-item:hover { background: var(--bg-secondary); }
.zp-log-icon { font-size: 22px; flex-shrink: 0; }
.zp-log-info { flex: 1; min-width: 0; }
.zp-log-name { font-size: 14.3px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zp-log-meta { font-size: 12.1px; color: var(--text-subtle); }
.zp-log-right { text-align: right; flex-shrink: 0; }
.zp-log-status { font-size: 11px; font-weight: 600; display: block; }
.zp-log-noted  { font-size: 9.9px; color: #1D9E75; display: block; margin-top: 2px; }

/* ── Add + Settings tabs ──────────────────────── */
.zp-form {
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.zp-frow { display: flex; flex-direction: column; gap: 4px; }
.zp-frow label { font-size: 12.1px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.zp-frow input, .zp-frow select, .zp-frow textarea {
  height: 34px; padding: 0 10px;
  border: 0.5px solid var(--border-strong); border-radius: var(--radius);
  font-size: 13.2px; background: var(--bg-card); color: var(--text);
  outline: none; font-family: var(--font); width: 100%; box-sizing: border-box;
}
.zp-frow input:focus, .zp-frow select:focus, .zp-frow textarea:focus { border-color: #F47B20; }
.zp-frow textarea { height: auto; padding: 8px 10px; }
.zp-hint { font-size: 11px; color: var(--text-subtle); margin-top: 2px; }

.zp-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.2px; color: var(--text); gap: 10px;
}
.zp-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.zp-switch input { opacity: 0; width: 0; height: 0; }
.zp-slider { position: absolute; inset: 0; background: #d1d5db; border-radius: 22px; cursor: pointer; transition: .25s; }
.zp-slider::before { content:''; position:absolute; width:16px; height:16px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:.25s; }
input:checked + .zp-slider { background: #F47B20; }
input:checked + .zp-slider::before { transform: translateX(16px); }

.zp-save-btn {
  height: 38px; border: none; border-radius: 10px;
  background: #F47B20; color: #fff; font-size: 14.3px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 7px; font-family: var(--font); transition: background .15s;
}
.zp-save-btn:hover { background: #e05f00; }

/* Settings specifics */
.zp-settings-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #FCEEE4;
  border-radius: 10px; border: 0.5px solid #F9C79E; margin-bottom: 4px;
}
.zp-settings-logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: #F47B20; display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}

.zp-setup-box {
  background: var(--bg-secondary); border-radius: 10px;
  border: 0.5px solid var(--border); padding: 12px;
}
.zp-setup-title { font-size: 12.1px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.zp-setup-list  { display: flex; flex-direction: column; gap: 7px; }
.zp-setup-step  { display: flex; align-items: flex-start; gap: 8px; font-size: 13.2px; color: var(--text-muted); }
.zp-step-num    {
  width: 20px; height: 20px; border-radius: 50%;
  background: #F47B20; color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.zp-link { color: #F47B20; font-weight: 600; text-decoration: none; }
.zp-link:hover { text-decoration: underline; }

.zp-providers-box { background: var(--bg-secondary); border-radius: 10px; border: 0.5px solid var(--border); padding: 12px; }
.zp-providers { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.zp-provider {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; background: var(--bg-card); border-radius: 8px;
  border: 0.5px solid var(--border); text-decoration: none; transition: border-color .12s;
}
.zp-provider:hover { border-color: #F47B20; }
.zp-provider-name  { font-size: 13.2px; font-weight: 600; color: var(--text); }
.zp-provider-price { font-size: 11px; color: var(--text-subtle); }

/* Post-call form (legacy classes — kept in case other markup still refs them) */
.zp-post-call { padding: 12px 14px; }
.zp-post-header {
  display: flex; align-items: center; gap: 7px;
  font-size: 13.2px; margin-bottom: 8px;
}
.zp-post-dur { margin-left: auto; font-size: 12.1px; color: var(--text-subtle); }
.zp-post-textarea {
  width: 100%; height: 56px; padding: 7px 10px; resize: none;
  border: 0.5px solid var(--border-strong); border-radius: 8px;
  font-size: 13.2px; background: var(--bg-card); color: var(--text);
  outline: none; font-family: var(--font); box-sizing: border-box; margin-bottom: 8px;
}
.zp-post-textarea:focus { border-color: #F47B20; }
.zp-post-row { display: flex; gap: 6px; }
.zp-post-select {
  height: 34px; padding: 0 8px; border: 0.5px solid var(--border-strong);
  border-radius: 8px; background: var(--bg-card); color: var(--text);
  font-size: 13.2px; outline: none; font-family: var(--font);
}
.zp-skip-btn {
  height: 34px; padding: 0 12px; border: 0.5px solid var(--border);
  border-radius: 8px; background: var(--bg-secondary); color: var(--text-muted);
  font-size: 13.2px; cursor: pointer; font-family: var(--font); white-space: nowrap;
}

/* ── Post-call "Log Call" sheet — floats over the bottom of the panel ── */
#zp-postcall-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 30;
  flex-direction: column;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 32px rgba(0,0,0,.28);
  overflow: hidden;
  max-height: 82%;
}
.zp-postcall-head {
  background: linear-gradient(135deg, #F47B20 0%, #e05f00 100%);
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; flex-shrink: 0;
}
.zp-postcall-head-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,.2); color: #fff; font-size: 16.5px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.zp-postcall-head-text { flex: 1; min-width: 0; }
.zp-postcall-title    { font-size: 14.3px; font-weight: 700; color: #fff; }
.zp-postcall-subtitle {
  font-size: 11px; color: rgba(255,255,255,.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zp-postcall-close {
  width: 26px; height: 26px; border: none; border-radius: 7px;
  background: rgba(255,255,255,.22); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.zp-postcall-close:hover { background: rgba(255,255,255,.35); }

.zp-postcall-body {
  background: var(--bg-card); padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto;
}
.zp-postcall-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zp-postcall-field label {
  display: block; font-size: 11px; font-weight: 700; color: var(--text-subtle);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px;
}
.zp-postcall-field input,
.zp-postcall-field select,
.zp-postcall-field textarea {
  width: 100%; box-sizing: border-box; height: 36px; padding: 0 10px;
  border: 0.5px solid var(--border-strong); border-radius: 8px;
  background: var(--bg-card); color: var(--text);
  font-size: 13.2px; font-family: var(--font); outline: none;
}
.zp-postcall-field textarea { height: 70px; padding: 8px 10px; resize: none; }
.zp-postcall-field input:focus,
.zp-postcall-field select:focus,
.zp-postcall-field textarea:focus { border-color: #F47B20; }
.zp-postcall-meta { text-align: center; font-size: 11.5px; color: var(--text-subtle); }
.zp-postcall-actions { display: flex; gap: 8px; }
.zp-postcall-skip {
  flex: 0 0 auto; height: 38px; padding: 0 16px;
  border: 0.5px solid var(--border); border-radius: 9px;
  background: var(--bg-secondary); color: var(--text-muted);
  font-size: 13.2px; font-weight: 600; cursor: pointer; font-family: var(--font);
}
.zp-postcall-skip:hover { background: var(--border); }
.zp-postcall-save {
  flex: 1; height: 38px; border: none; border-radius: 9px;
  background: #F47B20; color: #fff; font-size: 13.2px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 6px; font-family: var(--font); transition: background .15s;
}
.zp-postcall-save:hover { background: #e05f00; }

/* Loading / empty */
.zp-loading { display: flex; align-items: center; justify-content: center; padding: 32px; color: var(--text-subtle); font-size: 22px; }
.zp-loading i { animation: spin 1s linear infinite; }
.zp-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 14px; color: var(--text-subtle); font-size: 14.3px; text-align: center; }
.zp-empty i { font-size: 35.2px; }
.zp-empty-sub { font-size: 12.1px; color: var(--text-subtle); }

/* Vonage + XLite FABs hidden — Zoiper is primary phone */
#vonage-fab, #xlite-fab { display: none !important; }

/* ═══════════════════════════════════════════════
   AMICRM ORANGE & WHITE THEME — GLOBAL OVERRIDES
═══════════════════════════════════════════════ */

/* ── Page title bar ─────────────────────────── */
.topbar {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.07);
}
.topbar-title {
  font-size: 19.8px;
  font-weight: 700;
  color: #18181B;
}

/* ── Record filter bar ──────────────────────── */
.filter-bar {
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

/* ── Filters button + right-side drawer ─────── */
.filter-trigger-btn.has-active { background: var(--primary-light); color: var(--primary); border-color: rgba(244,123,32,.3); }
.filter-drawer-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.28); z-index: 700;
}
.filter-drawer-overlay.open { display: block; }
.filter-drawer-panel {
  position: fixed; top: 0; right: 0; height: 100%;
  width: 380px; max-width: 92vw;
  background: var(--bg-card); box-shadow: -8px 0 28px rgba(0,0,0,.16);
  z-index: 701; transform: translateX(100%); transition: transform .22s ease;
  display: flex; flex-direction: column;
}
.filter-drawer-panel.open { transform: translateX(0); }
.filter-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 0.5px solid var(--border);
  font-size: 15.4px; font-weight: 700; color: var(--text); flex-shrink: 0;
}
.filter-drawer-close {
  border: none; background: none; cursor: pointer; color: var(--text-muted);
  width: 30px; height: 30px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: background .15s;
}
.filter-drawer-close:hover { background: var(--bg); }
.filter-drawer-body {
  flex: 1; overflow-y: auto; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.filter-drawer-body .filter-group { min-width: 0; }
.filter-drawer-body .filter-select,
.filter-drawer-body .filter-input { width: 100%; }
.filter-drawer-foot {
  display: flex; gap: 10px; padding: 14px 18px;
  border-top: 0.5px solid var(--border); flex-shrink: 0;
}
.filter-drawer-foot .filter-clear-btn { flex: 1; justify-content: center; height: auto; align-self: auto; }
.filter-drawer-foot .btn-primary { flex: 1; justify-content: center; }
@media (max-width: 900px) { .filter-drawer-panel { width: 420px; } }
@media (max-width: 560px) { .filter-drawer-panel { width: 100vw; max-width: 100vw; } }

/* ── Table container ────────────────────────── */
.table-wrap {
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 12px;
  overflow: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
/* Keep the header pinned while the body scrolls vertically inside the
   bounded table-wrap, and the horizontal scrollbar always sits right at
   the box's own bottom edge instead of the bottom of unbounded content. */
.table-wrap .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* ── Record-list pages: fill the screen exactly, don't grow past it ───
   Card header + filter bar + pagination keep their natural height; the
   table-wrap grows to soak up whatever's left, so the grid (and its
   scrollbar) always finishes flush with the bottom of the viewport
   instead of trailing off below the fold at some fixed guessed height. */
#page-leads.active, #page-accounts.active, #page-contacts.active,
#page-deals.active, #page-purchase_orders.active, #page-sales_orders.active {
  display: flex;
  flex-direction: column;
  height: 100%;
}
#page-leads.active > .card, #page-accounts.active > .card, #page-contacts.active > .card,
#page-deals.active > .card, #page-purchase_orders.active > .card, #page-sales_orders.active > .card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
#page-leads.active .table-wrap, #page-accounts.active .table-wrap, #page-contacts.active .table-wrap,
#page-deals.active .table-wrap, #page-purchase_orders.active .table-wrap, #page-sales_orders.active .table-wrap {
  flex: 1;
  min-height: 120px;
}
#page-leads.active .card-header, #page-accounts.active .card-header, #page-contacts.active .card-header,
#page-deals.active .card-header, #page-purchase_orders.active .card-header, #page-sales_orders.active .card-header,
#page-leads.active .filter-bar, #page-accounts.active .filter-bar, #page-contacts.active .filter-bar,
#page-deals.active .filter-bar, #page-purchase_orders.active .filter-bar, #page-sales_orders.active .filter-bar,
#page-leads.active .pg-wrap, #page-accounts.active .pg-wrap, #page-contacts.active .pg-wrap,
#page-deals.active .pg-wrap, #page-purchase_orders.active .pg-wrap, #page-sales_orders.active .pg-wrap {
  flex-shrink: 0;
}
.table-header {
  padding: 14px 20px 12px;
  border-bottom: 1px solid rgba(0,0,0,.07);
  display: flex;
  align-items: center;
  gap: 10px;
}
.table-header-title {
  font-size: 15.4px;
  font-weight: 600;
  color: #18181B;
}

/* ── Data table refinements ─────────────────── */
.data-table th {
  background: #FAFAF9 !important;
  color: #71717A !important;
  font-size: 11.6px !important;
  font-weight: 700 !important;
  letter-spacing: .07em !important;
  padding: 11px 16px !important;
  border-bottom: 1px solid rgba(0,0,0,.07) !important;
}
.data-table td {
  padding: 11px 16px !important;
  border-bottom: 1px solid rgba(0,0,0,.05) !important;
  font-size: 14.3px;
  color: #27272A;
}
.data-table tr:last-child td { border-bottom: none !important; }
.data-table tbody tr { transition: background .1s; }
.data-table tbody tr:hover td {
  background: #FEF0E6 !important;
}

/* ── Add / action buttons in topbar ─────────── */
.btn[onclick*="openAddModal"],
.btn[onclick*="openModal"],
button.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 8px rgba(244,123,32,.28) !important;
}

/* ── Record count badge ─────────────────────── */
.records-count {
  font-size: 14.3px;
  color: #71717A;
  font-weight: 400;
}

/* ── Metric cards – orange accent on hover ── */
.metric-card {
  border-radius: 14px !important;
  transition: transform .15s, box-shadow .15s !important;
}
.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(244,123,32,.14) !important;
}
.metric-value { color: var(--text) !important; }

/* ── Status pills – warm palette ─────────────── */
.status-pill, .stage-pill {
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 12.1px;
  font-weight: 600;
}

/* ── Convert button ─────────────────────────── */
.btn-convert {
  background: #FEF0E6 !important;
  color: var(--primary) !important;
  border-color: rgba(244,123,32,.3) !important;
}
.btn-convert:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

/* ── Modal header ───────────────────────────── */
.modal-header {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(0,0,0,.07);
}
.modal-title {
  font-size: 18.7px;
  font-weight: 700;
  color: #18181B;
}

/* ── Form fields inside modals ──────────────── */
.dyn-field label {
  font-size: 12.1px;
  font-weight: 600;
  color: #71717A;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 5px;
  display: block;
}
.dyn-field input:focus,
.dyn-field select:focus,
.dyn-field textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(244,123,32,.12) !important;
}

/* ── Login page ─────────────────────────────── */
.login-wrap {
  background: linear-gradient(135deg, #FEF0E6 0%, #fff8f4 50%, #fff 100%);
}
.login-card {
  border-radius: 18px !important;
  box-shadow: 0 8px 40px rgba(244,123,32,.12), 0 2px 8px rgba(0,0,0,.06) !important;
  border: 1px solid rgba(244,123,32,.15) !important;
}
.login-brand-icon {
  background: var(--primary) !important;
  box-shadow: 0 4px 14px rgba(244,123,32,.4) !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
  font-size: 23px !important;
}
.login-brand-name { font-weight: 700 !important; font-size: 24px !important; }
.btn-login {
  background: var(--primary) !important;
  box-shadow: 0 4px 14px rgba(244,123,32,.35) !important;
  border-radius: 10px !important;
  height: 56px !important;
  font-size: 16.5px !important;
}
.btn-login:hover {
  background: var(--primary-dark) !important;
  box-shadow: 0 6px 20px rgba(244,123,32,.45) !important;
}
.form-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(244,123,32,.12) !important;
}
.demo-card:hover {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
}

/* ── Sidebar scrollbar ──────────────────────── */
.sb-nav::-webkit-scrollbar { width: 3px; }
.sb-nav::-webkit-scrollbar-track { background: transparent; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); border-radius: 2px; }

/* ── Active nav item solid highlight ─────────── */
.sb-item.active {
  background: var(--primary) !important;
  color: #fff !important;
}
.sb-item.active i { color: #fff !important; }

/* ── Zoiper FAB – keep orange brand ─────────── */
#zoiper-fab {
  background: var(--primary) !important;
  box-shadow: 0 4px 20px rgba(244,123,32,.5) !important;
}

/* ── Section headings inside pages ──────────── */
.section-title {
  font-size: 13.2px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: 10px;
}

/* ── Empty state ────────────────────────────── */
.act-empty i { color: rgba(244,123,32,.35) !important; }

/* ── Content scrollbar ───────────────────────── */
.content-area::-webkit-scrollbar { width: 5px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
.content-area::-webkit-scrollbar-thumb { background: rgba(244,123,32,.25); border-radius: 3px; }
.content-area::-webkit-scrollbar-thumb:hover { background: rgba(244,123,32,.45); }

/* ═══════════════════════════════════════════════
   ACTION BUTTONS + CLICKABLE ROWS
═══════════════════════════════════════════════ */

/* Clickable row */
.crm-row { transition: background .1s; }
.crm-row:hover td { background: #FEF0E6 !important; }
.crm-row:hover .actions-cell { opacity: 1; }
.actions-cell { opacity: .7; transition: opacity .15s; }
.crm-row:hover .actions-cell { opacity: 1; }

/* Base action button */
.act-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 9px; border-radius: 7px;
  font-size: 12.1px; font-weight: 600; cursor: pointer;
  border: 1px solid; font-family: var(--font);
  transition: all .15s; white-space: nowrap;
}
.act-btn i { font-size: 13.2px; }

/* Edit — subtle grey */
.act-btn-edit {
  background: #F4F4F5; color: #52525B;
  border-color: #D4D4D8;
}
.act-btn-edit:hover { background: #18181B; color: #fff; border-color: #18181B; }

/* Convert — orange */
.act-btn-convert {
  background: #FEF0E6; color: #F47B20;
  border-color: rgba(244,123,32,.35);
}
.act-btn-convert:hover { background: #F47B20; color: #fff; border-color: #F47B20;
  box-shadow: 0 2px 8px rgba(244,123,32,.35); }

/* SO — blue */
.act-btn-so {
  background: #EFF6FF; color: #2563EB;
  border-color: #BFDBFE;
}
.act-btn-so:hover { background: #2563EB; color: #fff; border-color: #2563EB; }

/* PO — green */
.act-btn-po {
  background: #F0FDF4; color: #16A34A;
  border-color: #BBF7D0;
}
.act-btn-po:hover { background: #16A34A; color: #fff; border-color: #16A34A; }

/* PDF — amber */
.act-btn-pdf {
  background: #FFFBEB; color: #D97706;
  border-color: #FDE68A;
}
.act-btn-pdf:hover { background: #D97706; color: #fff; border-color: #D97706; }

/* Delete — red */
.act-btn-del {
  background: #FFF1F2; color: #E11D48;
  border-color: #FECDD3;
}
.act-btn-del:hover { background: #E11D48; color: #fff; border-color: #E11D48; }

/* Converted badge */
.act-badge { display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 9px; border-radius: 99px;
  font-size: 12.1px; font-weight: 600; }

/* Row actions — 3-dot dropdown menu */
.row-actions-menu {
  display: none; position: fixed; z-index: 500; min-width: 200px;
  background: #fff; border: 1px solid #E4E4E7; border-radius: 10px;
  padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.14);
}
.row-actions-menu .ram-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: 0; background: none; border-radius: 7px;
  font-size: 12.8px; font-weight: 600; color: #3F3F46; cursor: pointer;
  text-align: left; font-family: var(--font); white-space: nowrap;
}
.row-actions-menu .ram-item:hover { background: #F4F4F5; }
.row-actions-menu .ram-item i { font-size: 14.3px; width: 16px; text-align: center; }
.row-actions-menu .ram-primary { color: #F47B20; }
.row-actions-menu .ram-primary:hover { background: #FEF0E6; }
.row-actions-menu .ram-danger { color: #E11D48; }
.row-actions-menu .ram-danger:hover { background: #FFF1F2; }
.row-actions-menu .ram-badge { color: #16A34A; }
.row-actions-menu .ram-badge:hover { background: none; }
.act-badge-done { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.act-badge i { font-size: 12.1px; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

/* ── Tablet: tighten grids, narrow the sidebar a bit ── */
@media (max-width: 1200px) {
  .metrics-grid{grid-template-columns:repeat(2,1fr)}
  .two-col{grid-template-columns:1fr}
  .profile-grid{grid-template-columns:repeat(2,1fr)}
  .sa-metrics{grid-template-columns:repeat(4,1fr)}
}

@media (max-width: 1024px) {
  .sidebar{width:240px}
  .sidebar.collapsed{width:76px}
  .content-area{padding:18px}
  .search-box{width:170px}
}

/* ── Mobile: sidebar becomes an off-canvas drawer ── */
@media (max-width: 860px) {
  .mobile-menu-btn{display:flex}
  .sb-collapse-btn{display:none}
  .sidebar,
  .sidebar.collapsed{
    position:fixed; top:0; left:0; height:100%; width:280px; z-index:200;
    transform:translateX(-100%); box-shadow:0 0 40px rgba(0,0,0,.25);
  }
  .sidebar.mobile-open,
  .sidebar.collapsed.mobile-open{ transform:translateX(0) }
  .sidebar.collapsed .sb-brand-name,
  .sidebar.collapsed .sb-section{ display:block }
  .sidebar.collapsed .sb-nav .sb-item{ font-size:14.3px; justify-content:flex-start; gap:9px; padding:9px 11px }
  .sidebar.collapsed .sb-nav .sb-item i{ font-size:17.6px }
  .sidebar.collapsed .sb-badge{ display:inline-block }

  .topbar{padding:0 16px}
  .page-toolbar{padding:12px 16px;flex-wrap:wrap}
  .topbar-title{font-size:17.6px}
  .search-box{display:none}
  .topbar-actions .btn-ghost{display:none !important}
  .tb-company{display:none}
  .tb-profile-text{max-width:110px}

  .metrics-grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .profile-grid{grid-template-columns:1fr}
  .profile-header{gap:14px;flex-wrap:wrap}
  .profile-upload-note{display:none}

  .modal-box{width:calc(100vw - 32px);padding:20px}
}

/* ── Small phones ── */
@media (max-width: 520px) {
  .content-area{padding:12px}
  .metrics-grid{grid-template-columns:1fr}
  .topbar-actions .btn span,
  .topbar-actions .btn{white-space:nowrap}
  .tb-name{max-width:80px}
  .profile-header{align-items:flex-start}
  .profile-header-info{margin-left:0}
  .profile-avatar{width:64px;height:64px;font-size:22px}
  .btn-upload-photo{padding:8px 16px;font-size:12.1px}
}

/* ── PASSWORD VISIBILITY TOGGLE ───────────────── */
.password-field{position:relative;display:flex;align-items:center}
.password-field input{width:100%;padding-right:38px}
.password-toggle{position:absolute;right:2px;background:none;border:none;cursor:pointer;color:var(--text-subtle);display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:7px;font-size:17.6px;transition:color .15s,background .15s}
.password-toggle:hover{color:var(--text);background:var(--bg)}

/* ── PHOTO UPLOAD MODAL ───────────────────────── */
.avatar-upload-zone{border:1.5px dashed var(--border-strong);border-radius:var(--radius-lg);padding:28px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s;min-height:160px;background:var(--bg)}
.avatar-upload-zone:hover{border-color:var(--primary);background:var(--primary-light)}
.avatar-upload-placeholder{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;pointer-events:none}
.avatar-upload-placeholder i{font-size:35.2px;color:var(--text-subtle)}
.avatar-upload-text{font-size:14.3px;font-weight:600;color:var(--text)}
.avatar-upload-hint{font-size:12.1px;color:var(--text-subtle)}
#avatar-preview-img{max-width:100%;max-height:180px;border-radius:var(--radius);object-fit:cover;pointer-events:none}
.avatar-upload-filename{font-size:13.2px;color:var(--text-muted);text-align:center;margin-top:8px}
.btn-remove-photo{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:14px;padding:9px;border-radius:var(--radius);border:1px solid #FECDD3;background:#FFF1F2;color:#E11D48;font-size:13.2px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .15s}
.btn-remove-photo:hover{background:#E11D48;color:#fff;border-color:#E11D48}
.btn-remove-photo i{font-size:14.3px}
/* ═══════════════════════════════════════════════
   ROLES & DATA SHARING PANEL
═══════════════════════════════════════════════ */
.rp-overlay { position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:800 }
.rp-drawer {
  position:fixed;top:0;right:0;width:580px;height:100vh;
  background:var(--bg-card);z-index:801;
  display:flex;flex-direction:column;
  box-shadow:-8px 0 32px rgba(0,0,0,.15);
}
.rp-header {
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 20px;border-bottom:1px solid var(--border);
  background:#F9FAFB;flex-shrink:0;
}
.rp-title { font-size:16px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:8px }
.rp-close { width:32px;height:32px;border:none;background:#FFFFFF;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--text-muted) }
.rp-close:hover { background:var(--danger-light);color:var(--danger-text) }

.rp-tabs { display:flex;gap:2px;padding:10px 16px;border-bottom:1px solid var(--border);flex-shrink:0 }
.rp-tab {
  flex:1;height:34px;border:none;border-radius:8px;
  background:transparent;color:var(--text-muted);
  font-size:12px;font-weight:500;cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:5px;
  font-family:var(--font);transition:all .15s;
}
.rp-tab:hover { background:#FFFFFF;color:var(--text) }
.rp-tab.active { background:#FEF0E6;color:#F47B20;font-weight:600 }
.rp-tab i { font-size:14px }

.rp-body { display:none;flex:1;overflow-y:auto;padding:16px 20px;flex-direction:column;gap:12px }
.rp-body.active { display:flex }

.rp-section-title {
  font-size:12px;color:var(--text-muted);
  padding:8px 12px;background:#F9FAFB;
  border-radius:8px;display:flex;align-items:center;gap:6px;
}

/* Sharing */
.rp-module-row { background:#F9FAFB;border:1px solid var(--border);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:8px }
.rp-module-name { font-size:13px;font-weight:600;color:var(--text);display:flex;align-items:center;gap:7px }
.rp-module-name i { font-size:15px;color:#F47B20 }
.rp-sharing-opts { display:flex;gap:6px;flex-wrap:wrap }
.rp-share-opt {
  flex:1;min-width:100px;padding:8px 10px;border:1.5px solid var(--border);
  border-radius:8px;cursor:pointer;display:flex;align-items:center;gap:6px;
  transition:all .15s;background:var(--bg-card);color:var(--text-muted);
}
.rp-share-opt input { display:none }
.rp-share-opt:hover { border-color:#F47B20;color:#F47B20 }
.rp-share-opt i { font-size:16px;flex-shrink:0 }
.rp-save-btn {
  height:40px;border:none;border-radius:10px;
  background:#F47B20;color:#fff;font-size:13px;font-weight:600;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  gap:7px;font-family:var(--font);transition:background .15s;margin-top:auto;flex-shrink:0;
}
.rp-save-btn:hover { background:#d4640c }

/* Users */
.rp-user-row {
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;background:#F9FAFB;
  border:1px solid var(--border);border-radius:10px;
}
.rp-user-av { width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex-shrink:0 }
.rp-user-info { flex:1;min-width:0 }
.rp-user-name { font-size:13px;font-weight:600;color:var(--text) }
.rp-user-email { font-size:11px;color:var(--text-muted) }
.rp-role-select {
  height:30px;padding:0 8px;border:1.5px solid;border-radius:8px;
  font-size:11px;font-weight:600;cursor:pointer;outline:none;
  font-family:var(--font);
}
.rp-perms-btn {
  height:30px;padding:0 10px;border:1px solid var(--border);
  border-radius:8px;background:#FFFFFF;color:var(--text-muted);
  font-size:11px;cursor:pointer;font-family:var(--font);
  display:flex;align-items:center;gap:4px;white-space:nowrap;
}
.rp-perms-btn:hover { border-color:#F47B20;color:#F47B20 }

/* Matrix */
.rp-matrix-table { width:100%;border-collapse:collapse;font-size:12px }
.rp-matrix-table th,.rp-matrix-table td { padding:7px 8px;border:1px solid var(--border);text-align:left }
.rp-matrix-table thead th { background:#F9FAFB;font-size:11px;font-weight:600 }
.rp-role-badge { padding:3px 10px;border-radius:99px;font-size:11px;font-weight:600 }
.rp-matrix-note { font-size:11px;color:var(--text-muted);padding:10px 12px;background:#F9FAFB;border-radius:8px;display:flex;gap:6px;align-items:flex-start;margin-top:8px }

.rp-loading { display:flex;align-items:center;justify-content:center;padding:32px;color:var(--text-subtle);font-size:16px;gap:8px }
.rp-loading i { animation:spin 1s linear infinite }
.rp-empty { padding:24px;text-align:center;color:var(--text-muted);font-size:13px }

/* ═══════════════════════════════════════════════
   TRANSFER / REASSIGN PANEL
═══════════════════════════════════════════════ */
.tp-overlay { position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:800 }
.tp-drawer {
  position:fixed;top:0;right:0;width:560px;height:100vh;
  background:var(--bg-card);z-index:801;
  display:flex;flex-direction:column;
  box-shadow:-8px 0 32px rgba(0,0,0,.15);
}
.tp-header {
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 20px;border-bottom:1px solid var(--border);
  background:#F9FAFB;flex-shrink:0;
}
.tp-title { font-size:16px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:8px }
.tp-close { width:32px;height:32px;border:none;background:#FFFFFF;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--text-muted) }
.tp-close:hover { background:var(--danger-light);color:var(--danger-text) }
.tp-body { flex:1;overflow-y:auto;padding:16px 20px;display:flex;flex-direction:column;gap:14px }

.tp-card { background:#F9FAFB;border:1px solid var(--border);border-radius:12px;padding:14px }
.tp-card-title { font-size:13px;font-weight:600;color:var(--text);margin-bottom:12px;display:flex;align-items:center;gap:8px }
.tp-step { width:22px;height:22px;border-radius:50%;background:#F47B20;color:#fff;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0 }

.tp-row2 { display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:end }
.tp-arrow { display:flex;align-items:center;justify-content:center;padding-bottom:4px;color:#F47B20;font-size:18px }
.tp-field { display:flex;flex-direction:column;gap:4px }
.tp-field label { font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em }
.tp-select { height:36px;padding:0 10px;border:1px solid var(--border-strong);border-radius:8px;background:var(--bg-card);color:var(--text);font-size:13px;outline:none;font-family:var(--font);width:100% }
.tp-select:focus { border-color:#F47B20 }

.tp-modules { display:flex;flex-direction:column;gap:6px }
.tp-module-check { display:flex;align-items:center;gap:10px;padding:8px 10px;background:var(--bg-card);border:1px solid var(--border);border-radius:8px;cursor:pointer;transition:all .12s }
.tp-module-check:hover { border-color:#F47B20;background:#FEF0E6 }
.tp-module-check input { accent-color:#F47B20;width:14px;height:14px;flex-shrink:0 }
.tp-mod-label { flex:1;font-size:12px;font-weight:500;color:var(--text) }
.tp-mod-count { font-size:12px;color:#9ca3af;min-width:24px;text-align:right }
.tp-select-all { margin-left:auto;height:22px;padding:0 8px;border:1px solid var(--border);border-radius:6px;background:var(--bg-card);color:var(--text-muted);font-size:11px;cursor:pointer;font-family:var(--font) }
.tp-select-all:hover { border-color:#F47B20;color:#F47B20 }
.tp-select-all + .tp-select-all { margin-left:4px }

.tp-preview-summary { display:flex;align-items:center;gap:14px;padding:12px;background:var(--bg-card);border-radius:8px }
.tp-preview-label { font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:2px }
.tp-preview-name { font-size:14px;font-weight:600;color:var(--text) }
.tp-preview-num { font-size:28px;font-weight:700;color:#F47B20;line-height:1 }
.tp-preview-total { margin-left:auto;text-align:center }
.tp-preview-empty { display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px;color:var(--text-muted);font-size:13px }

.tp-execute-btn {
  height:44px;border:none;border-radius:10px;
  background:#F47B20;color:#fff;font-size:14px;font-weight:600;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  gap:8px;font-family:var(--font);transition:all .15s;
}
.tp-execute-btn:hover:not(:disabled) { background:#d4640c }
.tp-execute-btn:disabled { opacity:.4;cursor:not-allowed }

.tp-success { display:flex;flex-direction:column;align-items:center;gap:10px;padding:20px;background:#F0FDF4;border:1px solid #BBF7D0;border-radius:10px;text-align:center }
.tp-success-msg { font-size:14px;font-weight:600;color:#15803D }
.tp-success-detail { display:flex;flex-wrap:wrap;gap:6px;justify-content:center }
.tp-success-tag { padding:3px 10px;background:#DCFCE7;color:#15803D;border-radius:99px;font-size:11px;font-weight:600 }

/* ═══════════════════════════════════════════════
   ANALYTICS DASHBOARD
═══════════════════════════════════════════════ */
.an-section-title { font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.08em;margin-bottom:12px;display:flex;align-items:center;gap:6px }

/* KPI Grid */
.an-kpi-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:20px }
.an-kpi-card { background:var(--bg-card);border:1px solid var(--border);border-radius:12px;padding:14px;display:flex;gap:12px;align-items:flex-start;transition:box-shadow .15s }
.an-kpi-card:hover { box-shadow:var(--shadow-md) }
.an-kpi-icon { width:42px;height:42px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0 }
.an-kpi-body { flex:1;min-width:0 }
.an-kpi-value { font-size:22px;font-weight:700;line-height:1.1;margin-bottom:2px }
.an-kpi-title { font-size:12px;font-weight:600;color:var(--text) }
.an-kpi-sub { font-size:11px;color:var(--text-muted);margin-bottom:6px }
.an-kpi-bar-wrap { height:4px;background:rgba(0,0,0,.06);border-radius:2px;overflow:hidden;margin-bottom:3px }
.an-kpi-bar { height:100%;border-radius:2px;transition:width .5s }
.an-kpi-pct { font-size:10px;color:var(--text-muted) }

/* Layout rows */
.an-row2 { display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-bottom:16px }
.an-card { background:var(--bg-card);border:1px solid var(--border);border-radius:12px;padding:16px;box-shadow:var(--shadow) }
.an-card-wide { grid-column:span 2 }
.an-card-title { font-size:13px;font-weight:600;color:var(--text);margin-bottom:14px;display:flex;align-items:center;gap:7px }

/* Funnel */
.an-funnel-wrap { display:flex;flex-direction:column;gap:8px }
.an-funnel-row { display:grid;grid-template-columns:130px 1fr 70px;align-items:center;gap:10px }
.an-funnel-label { font-size:12px;color:var(--text-muted);text-align:right }
.an-funnel-bar-wrap { background:rgba(0,0,0,.04);border-radius:6px;overflow:hidden;height:32px }
.an-funnel-bar { height:100%;border-radius:6px;display:flex;align-items:center;justify-content:flex-end;padding-right:10px;transition:width .5s }
.an-funnel-count { color:#fff;font-size:12px;font-weight:700 }
.an-funnel-conv { font-size:11px;color:var(--text-muted) }

/* Target Meters */
.an-targets-wrap { display:grid;grid-template-columns:1fr 1fr;gap:10px }
.an-meter { text-align:center }
.an-meter-gauge { display:flex;justify-content:center }
.an-meter-label { font-size:12px;font-weight:600;color:var(--text);margin-top:2px }
.an-meter-sub { font-size:10px;color:var(--text-muted) }

/* Cohort */
.an-cohort-wrap { overflow-x:auto }
.an-cohort-table { width:100%;border-collapse:collapse;font-size:12px }
.an-cohort-table th { padding:8px 12px;background:#F9FAFB;font-weight:600;color:var(--text-muted);text-transform:uppercase;font-size:10px;letter-spacing:.05em;border:1px solid var(--border) }
.an-cohort-table td { padding:8px 12px;border:1px solid var(--border);text-align:center }
.an-cohort-cell { font-weight:600 }
.an-cohort-0 { background:#F9FAFB;color:#9CA3AF }
.an-cohort-1 { background:#FEF3C7;color:#92400E }
.an-cohort-2 { background:#FDE68A;color:#78350F }
.an-cohort-3 { background:#FCD34D;color:#78350F }
.an-cohort-4 { background:#FBBF24;color:#fff }
.an-cohort-5 { background:#F59E0B;color:#fff }
.an-cohort-6 { background:#D97706;color:#fff }
.an-cohort-7 { background:#B45309;color:#fff }
.an-cohort-8 { background:#92400E;color:#fff }
.an-cohort-9 { background:#78350F;color:#fff }
.an-empty { padding:24px;text-align:center;color:var(--text-muted);font-size:13px }

/* ═══════════════════════════════════════════════
   MASS SELECTION ACTION BAR
═══════════════════════════════════════════════ */
#mass-action-bar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1C1917; color: #fff; border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 2px 8px rgba(244,123,32,.2);
  z-index: 500; min-width: 520px; max-width: 90vw;
  border: 1px solid rgba(244,123,32,.3);
  display: none;
  animation: mab-slide-up .2s ease;
}
@keyframes mab-slide-up {
  from { transform: translateX(-50%) translateY(20px); opacity:0; }
  to   { transform: translateX(-50%) translateY(0);    opacity:1; }
}
.mab-inner {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
}
.mab-count { flex-shrink: 0; text-align: center; min-width: 60px; }
.mab-count-num { font-size: 20px; font-weight: 700; color: #F47B20; line-height: 1; }
.mab-count-label { font-size: 10px; color: rgba(255,255,255,.6); }
.mab-actions { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.mab-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid; font-family: var(--font); white-space: nowrap;
  transition: all .15s;
}
.mab-btn-update  { background: rgba(244,123,32,.15); color: #FB923C; border-color: rgba(244,123,32,.3); }
.mab-btn-update:hover  { background: #F47B20; color: #fff; border-color: #F47B20; }
.mab-btn-transfer { background: rgba(59,130,246,.15); color: #93C5FD; border-color: rgba(59,130,246,.3); }
.mab-btn-transfer:hover { background: #3B82F6; color: #fff; border-color: #3B82F6; }
.mab-btn-export  { background: rgba(16,185,129,.15); color: #6EE7B7; border-color: rgba(16,185,129,.3); }
.mab-btn-export:hover  { background: #10B981; color: #fff; border-color: #10B981; }
.mab-btn-delete  { background: rgba(239,68,68,.15); color: #FCA5A5; border-color: rgba(239,68,68,.3); }
.mab-btn-delete:hover  { background: #EF4444; color: #fff; border-color: #EF4444; }
.mab-close {
  height: 34px; padding: 0 12px; border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px; background: transparent; color: rgba(255,255,255,.6);
  font-size: 12px; cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.mab-close:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Highlight selected rows */
.crm-row:has(.mass-select-cb:checked) td {
  background: rgba(244,123,32,.06) !important;
}

/* ═══════════════════════════════════════════════
   VIEW SETTINGS PANEL
═══════════════════════════════════════════════ */
.vs-overlay { position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:800 }
.vs-drawer {
  position:fixed;top:0;right:0;width:400px;height:100vh;
  background:var(--bg-card);z-index:801;
  display:flex;flex-direction:column;
  box-shadow:-6px 0 32px rgba(0,0,0,.15);
}
.vs-header {
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 18px;border-bottom:1px solid var(--border);
  background:#F9FAFB;flex-shrink:0;
}
.vs-title { font-size:15px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:8px }
.vs-close { width:30px;height:30px;border:none;background:#FFFFFF;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--text-muted) }
.vs-close:hover { background:var(--danger-light);color:var(--danger-text) }

.vs-section { padding:14px 18px;border-bottom:1px solid var(--border);flex-shrink:0 }
.vs-section:last-of-type { border-bottom:none;overflow-y:auto;flex:1 }
.vs-section-title { font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.07em;margin-bottom:10px }

/* View mode */
.vs-mode-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:8px }
.vs-mode-opt {
  display:flex;flex-direction:column;align-items:center;gap:6px;
  padding:12px 8px;border:1.5px solid var(--border);border-radius:10px;
  cursor:pointer;font-size:12px;font-weight:500;color:var(--text-muted);
  transition:all .15s;
}
.vs-mode-opt input { display:none }
.vs-mode-opt i { font-size:20px }
.vs-mode-opt:hover { border-color:#F47B20;color:#F47B20 }
.vs-mode-opt.active { border-color:#F47B20;background:#FEF0E6;color:#F47B20 }

/* Per page */
.vs-perpage-grid { display:flex;gap:6px;flex-wrap:wrap }
.vs-perpage-opt {
  padding:6px 14px;border:1.5px solid var(--border);border-radius:8px;
  cursor:pointer;font-size:13px;font-weight:500;color:var(--text-muted);
  transition:all .15s;
}
.vs-perpage-opt input { display:none }
.vs-perpage-opt:hover { border-color:#F47B20;color:#F47B20 }
.vs-perpage-opt.active { border-color:#F47B20;background:#FEF0E6;color:#F47B20;font-weight:700 }

/* Column list */
.vs-col-list { display:flex;flex-direction:column;gap:3px }
.vs-col-item {
  display:flex;align-items:center;gap:8px;padding:8px 10px;
  border:1px solid transparent;border-radius:8px;
  background:#F9FAFB;cursor:default;
  transition:all .12s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;
}
.vs-col-item:hover { border-color:var(--border);background:var(--bg-card) }
.vs-drag-handle { font-size:16px;color:var(--text-subtle);cursor:grab;flex-shrink:0 }
.vs-drag-handle:active { cursor:grabbing }
.vs-col-toggle { display:flex;align-items:center;gap:8px;flex:1;cursor:pointer }
.vs-col-toggle input { accent-color:#F47B20;width:14px;height:14px;flex-shrink:0 }
.vs-col-name { font-size:13px;color:var(--text) }
.vs-col-type { font-size:10px;color:var(--text-subtle);background:#FFFFFF;border-radius:4px;padding:2px 6px;flex-shrink:0 }
.vs-sm-btn { height:24px;padding:0 8px;border:1px solid var(--border);border-radius:6px;background:var(--bg-card);color:var(--text-muted);font-size:11px;cursor:pointer;font-family:var(--font) }
.vs-sm-btn:hover { border-color:#F47B20;color:#F47B20 }

/* Footer */
.vs-footer { display:flex;gap:8px;padding:14px 18px;border-top:1px solid var(--border);flex-shrink:0 }
.vs-reset-btn { height:38px;padding:0 14px;border:1px solid var(--border);border-radius:9px;background:#FFFFFF;color:var(--text-muted);font-size:13px;cursor:pointer;font-family:var(--font);display:flex;align-items:center;gap:6px }
.vs-reset-btn:hover { border-color:#F47B20;color:#F47B20 }
.vs-apply-btn { flex:1;height:38px;border:none;border-radius:9px;background:#F47B20;color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:var(--font);display:flex;align-items:center;justify-content:center;gap:6px }
.vs-apply-btn:hover { background:#d4640c }

/* Pagination */
.pg-wrap { display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-top:1px solid var(--border);flex-wrap:wrap;gap:8px }
.pg-info { font-size:12px;color:var(--text-muted) }
.pg-btns { display:flex;gap:3px;align-items:center }
.pg-btn { height:30px;min-width:30px;padding:0 6px;border:1px solid var(--border);border-radius:7px;background:var(--bg-card);color:var(--text-muted);cursor:pointer;font-size:12px;font-family:var(--font);display:flex;align-items:center;justify-content:center;transition:all .12s }
.pg-btn:hover:not(:disabled) { border-color:#F47B20;color:#F47B20 }
.pg-btn.active { background:#F47B20;color:#fff;border-color:#F47B20;font-weight:700 }
.pg-btn:disabled { opacity:.35;cursor:not-allowed }
.pg-dots { padding:0 4px;color:var(--text-muted);font-size:12px }
.pg-perpage-sel { height:30px;padding:0 8px;border:1px solid var(--border);border-radius:7px;background:var(--bg-card);color:var(--text-muted);font-size:12px;outline:none;cursor:pointer }
.pg-perpage-sel:focus { border-color:#F47B20 }

/* ═══════════════════════════════════════════════
   EMAIL COMPOSE & SETTINGS
═══════════════════════════════════════════════ */
/* Compose */
.ec-field { display:flex;flex-direction:column;gap:4px }
.ec-label { font-size:11px;font-weight:600;color:#71717A;text-transform:uppercase;letter-spacing:.05em }
.ec-input { height:36px;padding:0 10px;border:1px solid #D4D4D8;border-radius:8px;font-size:13px;outline:none;font-family:inherit;width:100%;box-sizing:border-box }
.ec-input:focus { border-color:#F47B20;box-shadow:0 0 0 3px rgba(244,123,32,.1) }
.ec-toolbar { display:flex;align-items:center;gap:4px;padding:6px 8px;background:#F9FAFB;border:1px solid #E5E7EB;border-radius:8px;flex-wrap:wrap }
.ec-tool { height:28px;min-width:28px;padding:0 8px;border:none;background:transparent;cursor:pointer;border-radius:6px;font-size:13px;color:#374151;display:inline-flex;align-items:center;justify-content:center;gap:4px }
.ec-tool:hover { background:#F3F4F6 }
.ec-divider { width:1px;height:20px;background:#E5E7EB;margin:0 2px }
.ec-body { border:1px solid #D4D4D8;border-radius:8px;padding:12px;font-size:14px;line-height:1.6;outline:none;color:#18181B }
.ec-body:focus { border-color:#F47B20 }
.ec-body:empty:before { content:attr(data-placeholder);color:#9CA3AF }
.ec-body img { max-width:100%;height:auto }
.ec-mode-tabs { display:flex;gap:2px }
.ec-mode-tab { height:28px;padding:0 12px;border:1px solid #E5E7EB;border-bottom:none;background:#F9FAFB;cursor:pointer;border-radius:8px 8px 0 0;font-size:12px;font-weight:600;color:#71717A;font-family:inherit }
.ec-mode-tab:hover { color:#18181B;background:#F3F4F6 }
.ec-mode-tab.active { background:#fff;color:#F47B20;border-color:#D4D4D8 }
.ec-body-html { border:1px solid #D4D4D8;border-radius:0 8px 8px 8px;padding:12px;font-size:12.5px;line-height:1.6;outline:none;color:#18181B;font-family:'SF Mono',Consolas,monospace;white-space:pre;resize:none;box-sizing:border-box;width:100% }
.ec-body-html:focus { border-color:#F47B20 }
.ec-body-preview { border:1px solid #D4D4D8;border-radius:0 8px 8px 8px;width:100%;box-sizing:border-box;background:#fff }

/* Settings drawer */
.es-overlay { position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:800 }
.es-drawer { position:fixed;top:0;right:0;width:520px;height:100vh;background:#fff;z-index:801;display:flex;flex-direction:column;box-shadow:-8px 0 32px rgba(0,0,0,.15) }
.es-header { display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #E5E7EB;background:#FAFAF9;flex-shrink:0 }
.es-title { font-size:16px;font-weight:700;color:#18181B;display:flex;align-items:center;gap:8px }
.es-close { width:30px;height:30px;border:none;background:#F4F4F5;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#71717A }
.es-body { flex:1;overflow-y:auto;padding:0 }
.es-section { padding:14px 20px;border-bottom:1px solid #F3F4F6 }
.es-section-title { font-size:11px;font-weight:700;color:#71717A;text-transform:uppercase;letter-spacing:.07em;margin-bottom:10px }
.es-provider-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:8px }
.es-provider-opt { display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 6px;border:1.5px solid #E5E7EB;border-radius:10px;cursor:pointer;transition:all .15s }
.es-provider-opt:hover { border-color:#F47B20 }
.es-provider-opt.active { border-color:#F47B20;background:#FEF0E6 }
.es-provider-icon { font-size:22px }
.es-provider-label { font-size:11px;font-weight:600;color:#374151;text-align:center }
.es-hint { font-size:11px;color:#9CA3AF;margin-top:4px }
.es-grid2 { display:grid;grid-template-columns:1fr 1fr;gap:10px }
.es-field { display:flex;flex-direction:column;gap:4px }
.es-field label { font-size:11px;font-weight:600;color:#71717A;text-transform:uppercase;letter-spacing:.05em }
.es-input { height:36px;padding:0 10px;border:1px solid #D4D4D8;border-radius:8px;font-size:13px;outline:none;font-family:inherit;width:100%;box-sizing:border-box }
.es-input:focus { border-color:#F47B20 }
.es-guides { display:flex;flex-direction:column;gap:6px }
.es-guide { display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:#F9FAFB;border-radius:8px;text-decoration:none;color:#374151;font-size:13px;border:1px solid #E5E7EB;transition:all .12s }
.es-guide:hover { border-color:#F47B20;color:#F47B20 }
.es-footer { display:flex;align-items:center;gap:8px;padding:14px 20px;border-top:1px solid #E5E7EB;flex-shrink:0 }
.es-test-btn { height:38px;padding:0 14px;border:1px solid #D4D4D8;border-radius:9px;background:#fff;cursor:pointer;font-size:13px;font-family:inherit;display:flex;align-items:center;gap:6px;color:#374151 }
.es-test-btn:hover { border-color:#F47B20;color:#F47B20 }
.es-save-btn { height:38px;padding:0 18px;background:#F47B20;color:#fff;border:none;border-radius:9px;cursor:pointer;font-size:13px;font-weight:600;font-family:inherit;display:flex;align-items:center;gap:6px;margin-left:auto }
.es-save-btn:hover { background:#d4640c }


/* ── REPORTS SUBTABS (Overview / Activity) ──── */
.rpt-subtab{display:none}
.rpt-subtab.active{display:block}

/* ── REPORTS: scrollable list w/ sticky header, hidden scrollbar ── */
.rpt-scroll-box{max-height:420px;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}
.rpt-scroll-box::-webkit-scrollbar{display:none}
.rpt-scroll-box thead th{position:sticky;top:0;z-index:1}
.rpt-pager-btn{height:26px;min-width:26px;padding:0 8px;border:1px solid #E5E7EB;border-radius:6px;background:#fff;color:#6B7280;font-size:12px;cursor:pointer;font-family:inherit}
.rpt-pager-btn:hover:not(:disabled){border-color:#F47B20;color:#F47B20}
.rpt-pager-btn.active{border-color:#F47B20;background:#FEF0E6;color:#F47B20;font-weight:700}
.rpt-pager-btn:disabled{opacity:.4;cursor:default}
.rpt-pager-ellipsis{padding:0 4px;color:#9CA3AF;font-size:12px}
