@font-face { font-family: 'IRANSans'; src: url('../fonts/iransans-ultralight.woff') format('woff'); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSans'; src: url('../fonts/iransans-light.woff') format('woff'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSans'; src: url('../fonts/iransans-regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSans'; src: url('../fonts/iransans-medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSans'; src: url('../fonts/iransans-bold.woff') format('woff'); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSans'; src: url('../fonts/iransans-black.woff') format('woff'); font-weight: 900; font-style: normal; font-display: swap; }
/* NirwebSupport — UI. Design tokens follow the approved prototypes (emerald brand, slate neutrals). */
.nwsp-root, .nwsp-settings {
	--b50: #ecfdf5; --b100: #d1fae5; --b200: #a7f3d0; --b400: #34d399; --b500: #10b981; --b600: #059669; --b700: #047857; --b800: #065f46; --b900: #064e3b;
	--s50: #f8fafc; --s100: #f1f5f9; --s200: #e2e8f0; --s300: #cbd5e1; --s400: #94a3b8; --s500: #64748b; --s600: #475569; --s700: #334155; --s800: #1e293b; --s900: #0f172a;
	--amber-50: #fffbeb; --amber-100: #fef3c7; --amber-200: #fde68a; --amber-600: #d97706; --amber-700: #b45309; --amber-800: #92400e;
	--sky-50: #f0f9ff; --sky-100: #e0f2fe; --sky-600: #0284c7; --sky-800: #075985;
	--rose-50: #fff1f2; --rose-100: #ffe4e6; --rose-200: #fecdd3; --rose-600: #e11d48; --rose-700: #be123c; --rose-800: #9f1239;
	--violet-50: #f5f3ff; --violet-100: #ede9fe; --violet-600: #7c3aed; --violet-800: #5b21b6;
	--shadow: 0 1px 2px rgba(15, 23, 42, .05);
	font-family: 'IRANSans', Tahoma, -apple-system, 'Segoe UI', sans-serif;
	font-size: calc(13px * var(--fs, 1));
	line-height: 1.7;
	color: var(--s900);
}
.nwsp-root *, .nwsp-root *::before, .nwsp-root *::after { box-sizing: border-box; font-family: inherit; }
.nwsp-root { width: 100%; max-width: 100%; }
.nwsp-root[data-mode="client"], .nwsp-root[data-mode="admin"] { min-height: 320px; }
.nwsp-root[data-mode="admin"] { padding: 10px 12px; }
.nwsp-root svg.i { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nwsp-root a { color: var(--b700); }
.nwsp-root h1, .nwsp-root h2, .nwsp-root h3, .nwsp-root h4, .nwsp-root p { margin: 0; }
.nwsp-root button { cursor: pointer; }
.nwsp-root [hidden] { display: none !important; }
.nwsp-stack > * + * { margin-top: 12px; }

/* Loading / empty */
.nwsp-loading { display: flex; justify-content: center; padding: 60px 0; }
.nwsp-spinner { width: 28px; height: 28px; border: 3px solid var(--b100); border-top-color: var(--b600); border-radius: 50%; animation: nwsp-spin .7s linear infinite; display: inline-block; }
.nwsp-spinner--sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes nwsp-spin { to { transform: rotate(360deg); } }
.nwsp-empty { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 16px; padding: 40px 20px; text-align: center; color: var(--s400); }
.nwsp-empty strong { display: block; color: var(--s700); margin-bottom: 4px; font-size: calc(14px * var(--fs, 1)); }
.nwsp-alert { background: var(--rose-50); border: 1px solid var(--rose-200); color: var(--rose-800); border-radius: 12px; padding: 12px 16px; font-size: calc(12px * var(--fs, 1)); }
.nwsp-login { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 20px; padding: 40px; text-align: center; max-width: 480px; margin: 20px auto; }
.nwsp-login p { color: var(--s500); margin: 8px 0 18px; }

/* Cards & buttons */
.nwsp-card { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 16px; box-shadow: var(--shadow); }
.nwsp-card--pad { padding: 20px; }
.nwsp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 12px; padding: 9px 16px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; line-height: 1.4; }
.nwsp-btn:active { transform: scale(.97); }
.nwsp-btn[disabled] { opacity: .55; cursor: not-allowed; }
.nwsp-root button.nwsp-btn--primary, .nwsp-root button.nwsp-btn--primary:disabled, .nwsp-root button.nwsp-btn--primary[disabled] { background: linear-gradient(135deg, var(--b500, #10b981) 0%, var(--b600, #059669) 100%) !important; color: #fff !important; border-color: var(--b700, #047857) !important; }
.nwsp-root button.nwsp-btn--primary:disabled, .nwsp-root button.nwsp-btn--primary[disabled] { opacity: .6; }
.nwsp-btn--primary { background: var(--b600); color: #fff !important; box-shadow: 0 6px 14px rgba(5, 150, 105, .22); }
.nwsp-btn--primary:hover { background: var(--b700); }
.nwsp-btn--dark { background: var(--s800); color: #fff !important; }
.nwsp-btn--dark:hover { background: var(--s900); }
.nwsp-btn--ghost { background: var(--surface, #fff); border-color: var(--s200); color: var(--s700) !important; }
.nwsp-btn--ghost:hover { background: var(--s50); }
.nwsp-btn--soft { background: var(--s100); color: var(--s700) !important; border-color: var(--s200); }
.nwsp-btn--soft:hover { background: var(--s200); }
.nwsp-btn--danger { background: var(--rose-50); border-color: var(--rose-200); color: var(--rose-700) !important; }
.nwsp-btn--danger:hover { background: var(--rose-100); }
.nwsp-btn--sm { padding: 6px 10px; font-size: calc(11px * var(--fs, 1)); border-radius: 10px; }
/* The site theme resets button/field corners to 0; keep ours rounded. */
.nwsp-root .nwsp-btn, .nwsp-root button.nwsp-btn, .nwsp-root a.nwsp-btn, .nwsp-root button[type=submit], .nwsp-root input[type=submit] { border-radius: 12px !important; }
.nwsp-root .nwsp-btn--sm, .nwsp-root button.nwsp-btn--sm { border-radius: 10px !important; }
.nwsp-root input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), .nwsp-root select, .nwsp-root textarea { border-radius: 12px !important; }
.nwsp-createform .nwsp-formfoot button, .nwsp-voice [data-a="toggle"], .nwsp-voice [data-a="del"] { border-radius: 14px !important; }
.nwsp-btn--icon { padding: 7px; border-radius: 10px; }
.nwsp-btn--lg { padding: 13px 28px; font-size: calc(13px * var(--fs, 1)); }

/* Pills */
.nwsp-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: calc(11px * var(--fs, 1)); font-weight: 700; white-space: nowrap; }
.nwsp-pill--amber { background: var(--amber-100); color: var(--amber-800); }
.nwsp-pill--sky { background: var(--sky-100); color: var(--sky-800); }
.nwsp-pill--brand { background: var(--b100); color: var(--b800); }
.nwsp-pill--rose { background: var(--rose-100); color: var(--rose-800); }
.nwsp-pill--violet { background: var(--violet-100); color: var(--violet-800); }
.nwsp-pill--slate { background: var(--s100); color: var(--s600); }
.nwsp-tag { display: inline-block; padding: 1px 8px; border-radius: 8px; font-size: calc(10px * var(--fs, 1)); font-weight: 700; background: var(--s100); color: var(--s600); }
.nwsp-tag--rose { background: var(--rose-50); color: var(--rose-700); border: 1px solid var(--rose-200); }
.nwsp-tag--amber { background: var(--amber-50); color: var(--amber-700); border: 1px solid var(--amber-200); }
.nwsp-id { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; font-size: calc(12px * var(--fs, 1)); color: var(--b700); background: var(--b50); border: 1px solid var(--b200); padding: 1px 8px; border-radius: 8px; direction: ltr; display: inline-block; }

/* Header strips */
.nwsp-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 18px; }
.nwsp-brand { display: flex; align-items: center; gap: 12px; }
.nwsp-logo { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--b700), var(--b500)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: calc(18px * var(--fs, 1)); box-shadow: 0 6px 14px rgba(5, 150, 105, .25); }
.nwsp-brand h2 { font-size: calc(14px * var(--fs, 1)); font-weight: 800; }
.nwsp-brand p { font-size: calc(11px * var(--fs, 1)); color: var(--s400); }
.nwsp-tabs-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nwsp-pagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--s200); }
.nwsp-pagehead h1 { font-size: calc(20px * var(--fs, 1)); font-weight: 900; }
.nwsp-pagehead p { font-size: calc(12px * var(--fs, 1)); color: var(--s500); margin-top: 2px; }
.nwsp-pagehead .nwsp-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* KPI */
.nwsp-kpis { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
@media (min-width: 640px) { .nwsp-kpis--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .nwsp-kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .nwsp-kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.nwsp-kpi { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; text-align: start; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
button.nwsp-kpi { font: inherit; color: inherit; }
button.nwsp-kpi:hover { border-color: var(--b400); }
.nwsp-kpi.is-active { border: 2px solid var(--b600); background: rgba(236, 253, 245, .5); padding: 15px; }
.nwsp-kpi__head { display: flex; align-items: center; justify-content: space-between; font-size: calc(12px * var(--fs, 1)); font-weight: 500; color: var(--s500); }
.nwsp-kpi__icon { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: calc(15px * var(--fs, 1)); }
.nwsp-kpi__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.nwsp-kpi__n { font-size: calc(24px * var(--fs, 1)); font-weight: 900; line-height: 1.2; }
.nwsp-kpi__hint { font-size: calc(10px * var(--fs, 1)); font-weight: 700; padding: 1px 8px; border-radius: 6px; }
.nwsp-tone-amber .nwsp-kpi__icon, .nwsp-tone-amber .nwsp-kpi__hint { background: var(--amber-50); color: var(--amber-700); } .nwsp-tone-amber .nwsp-kpi__n { color: var(--amber-600); }
.nwsp-tone-sky .nwsp-kpi__icon, .nwsp-tone-sky .nwsp-kpi__hint { background: var(--sky-50); color: var(--sky-800); } .nwsp-tone-sky .nwsp-kpi__n { color: var(--sky-600); }
.nwsp-tone-brand .nwsp-kpi__icon, .nwsp-tone-brand .nwsp-kpi__hint { background: var(--b50); color: var(--b700); } .nwsp-tone-brand .nwsp-kpi__n { color: var(--b600); }
.nwsp-tone-rose .nwsp-kpi__icon, .nwsp-tone-rose .nwsp-kpi__hint { background: var(--rose-50); color: var(--rose-700); } .nwsp-tone-rose .nwsp-kpi__n { color: var(--rose-600); }
.nwsp-tone-violet .nwsp-kpi__icon, .nwsp-tone-violet .nwsp-kpi__hint { background: var(--violet-50); color: var(--violet-800); } .nwsp-tone-violet .nwsp-kpi__n { color: var(--violet-600); }
.nwsp-tone-slate .nwsp-kpi__icon { background: var(--s100); color: var(--s700); } .nwsp-tone-slate .nwsp-kpi__n { color: var(--s800); }
.nwsp-kpi.is-active.nwsp-tone-all .nwsp-kpi__icon { background: var(--b600); color: #fff; }

/* Toolbar / inputs */
.nwsp-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 14px; }
.nwsp-toolbar__group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1; }
.nwsp-search { position: relative; flex: 1; min-width: 200px; max-width: 420px; }
.nwsp-search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--s400); }
.nwsp-search input { padding-inline-start: 36px !important; }
.nwsp-input, .nwsp-select, .nwsp-textarea { width: 100%; background: var(--s50); border: 1px solid var(--s200); border-radius: 12px; padding: 9px 12px; font-size: calc(12px * var(--fs, 1)); color: var(--s900); outline: none; transition: border-color .15s, background .15s; box-shadow: none; min-height: 0; }
.nwsp-input:focus, .nwsp-select:focus, .nwsp-textarea:focus { background: var(--surface, #fff); border-color: var(--b600); box-shadow: 0 0 0 3px rgba(5, 150, 105, .1); }
.nwsp-input--lg, .nwsp-select--lg { padding: 12px 14px; font-size: calc(13px * var(--fs, 1)); }
.nwsp-select { appearance: none; -webkit-appearance: none; width: auto; min-width: 140px; padding-inline-end: 34px; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: left 12px center; background-size: 15px; cursor: pointer; }
html[dir="ltr"] .nwsp-select, .nwsp-root[dir="ltr"] .nwsp-select { background-position: right 12px center; }
.nwsp-select--block { width: 100%; }
.nwsp-textarea { resize: vertical; line-height: 1.9; }
.nwsp-label { display: block; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s700); margin-bottom: 8px; }
.nwsp-req { color: var(--rose-600); }
.nwsp-hint { font-size: calc(11px * var(--fs, 1)); color: var(--s400); }
.nwsp-check { accent-color: var(--b600); width: 15px; height: 15px; cursor: pointer; }

/* Ticket list (client) */
.nwsp-ticket { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 16px; padding: 16px 18px; cursor: pointer; transition: border-color .15s, box-shadow .15s; box-shadow: var(--shadow); width: 100%; text-align: start; }
.nwsp-ticket:hover, .nwsp-ticket:focus-visible { border-color: var(--b500); outline: none; }
.nwsp-ticket__main { display: flex; gap: 14px; flex: 1; min-width: 240px; align-items: flex-start; }
.nwsp-ticket__hash { width: 40px; height: 40px; border-radius: 12px; background: var(--s100); color: var(--s600); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; transition: .15s; }
.nwsp-ticket:hover .nwsp-ticket__hash { background: var(--b50); color: var(--b700); }
.nwsp-ticket__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nwsp-ticket__title h3 { font-size: calc(13px * var(--fs, 1)); font-weight: 800; color: var(--s900); }
.nwsp-ticket__last { font-size: calc(12px * var(--fs, 1)); color: var(--s500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 640px; margin-top: 2px; }
.nwsp-ticket__meta { font-size: calc(11px * var(--fs, 1)); color: var(--s400); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.nwsp-ticket__side { display: flex; align-items: center; gap: 12px; }

/* Admin table */
.nwsp-tablewrap { overflow-x: auto; }
.nwsp-t { width: 100%; border-collapse: collapse; font-size: calc(12px * var(--fs, 1)); text-align: start; }
.nwsp-t th { background: rgba(248, 250, 252, .9); color: var(--s600); font-weight: 800; padding: 14px 14px; border-bottom: 1px solid var(--s200); text-align: start; white-space: nowrap; }
.nwsp-t td { padding: 14px; border-bottom: 1px solid var(--s100); vertical-align: top; color: var(--s700); }
.nwsp-t tr:hover td { background: rgba(248, 250, 252, .8); }
.nwsp-t .nwsp-subject { font-weight: 800; color: var(--s900); cursor: pointer; background: none; border: 0; padding: 0; font-size: calc(12px * var(--fs, 1)); text-align: start; }
.nwsp-t .nwsp-subject:hover { color: var(--b700); }
.nwsp-t .nwsp-sub { font-size: calc(11px * var(--fs, 1)); color: var(--s400); margin-top: 3px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nwsp-t .nwsp-cell-actions { display: flex; gap: 6px; justify-content: center; }
.nwsp-sla { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--s500); font-size: calc(11px * var(--fs, 1)); }
.nwsp-sla--warn { color: var(--amber-700); } .nwsp-sla--breach { color: var(--rose-600); } .nwsp-sla--done { color: var(--s400); font-weight: 500; }
.nwsp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--b500); display: inline-block; }
.nwsp-dot--none { background: var(--s300); }
.nwsp-tfoot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: rgba(248, 250, 252, .7); border-top: 1px solid var(--s100); font-size: calc(12px * var(--fs, 1)); color: var(--s500); }
.nwsp-pager { display: flex; gap: 4px; flex-wrap: wrap; }
.nwsp-pager button { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--s200); background: var(--surface, #fff); font-size: calc(12px * var(--fs, 1)); color: var(--s700); }
.nwsp-pager button.is-active { background: var(--b600); border-color: var(--b600); color: #fff; font-weight: 800; }
.nwsp-pager button[disabled] { opacity: .45; cursor: not-allowed; }
.nwsp-bulk { display: flex; gap: 6px; align-items: center; }

/* Create form */
.nwsp-formcard { padding: 28px; }
.nwsp-formcard > header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--s100); margin-bottom: 22px; }
.nwsp-formcard h2 { font-size: calc(16px * var(--fs, 1)); font-weight: 900; display: flex; align-items: center; gap: 10px; }
.nwsp-formcard h2::before { content: ''; width: 10px; height: 24px; border-radius: 999px; background: var(--b600); display: inline-block; }
.nwsp-grid2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .nwsp-grid2 { grid-template-columns: 1fr 1fr; } }
.nwsp-formcard form > * + * { margin-top: 22px; }
.nwsp-fieldhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.nwsp-fieldhead .nwsp-label { margin: 0; }
.nwsp-formfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; border-top: 1px solid var(--s100); }
.nwsp-formfoot .nwsp-hint { display: flex; gap: 6px; align-items: center; }

/* Context box */
.nwsp-context { border: 1px dashed var(--s300); background: var(--s50); border-radius: 14px; padding: 12px 14px; font-size: calc(11px * var(--fs, 1)); color: var(--s600); }
.nwsp-context__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 800; color: var(--s700); margin-bottom: 6px; font-size: calc(12px * var(--fs, 1)); }
.nwsp-context dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.nwsp-context dt { color: var(--s400); } .nwsp-context dd { margin: 0; word-break: break-all; }

/* Editor */
.nwsp-editor { border: 1px solid var(--s200); border-radius: 16px; background: var(--surface, #fff); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.nwsp-editor:focus-within { border-color: var(--b600); box-shadow: 0 0 0 3px rgba(5, 150, 105, .1); }
.nwsp-editor__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; background: var(--s50); border-bottom: 1px solid var(--s200); user-select: none; }
.nwsp-editor__grp { display: inline-flex; align-items: center; border: 1px solid var(--s200); border-radius: 8px; background: var(--surface, #fff); overflow: hidden; }
.nwsp-editor__grp > * + * { border-inline-start: 1px solid var(--s200); }
.nwsp-ebtn { padding: 6px 9px; border: 0; background: transparent; color: var(--s600); font-size: calc(13px * var(--fs, 1)); display: inline-flex; align-items: center; justify-content: center; border-radius: 0; transition: .15s; line-height: 1; min-width: 30px; }
.nwsp-ebtn:hover { background: var(--s100); color: var(--b600); }
.nwsp-ebtn.is-active { background: var(--b50); color: var(--b700); }
.nwsp-ebtn--solo { border: 1px solid var(--s200); border-radius: 8px; background: var(--surface, #fff); }
.nwsp-eselect { border: 0; background: var(--surface, #fff); font-size: calc(12px * var(--fs, 1)); padding: 5px 8px; color: var(--s700); outline: none; cursor: pointer; }
.nwsp-editor__area { padding: 14px 16px; min-height: 150px; max-height: 360px; overflow-y: auto; outline: none; font-size: calc(13px * var(--fs, 1)); line-height: 2; background: var(--surface, #fff); }
.nwsp-editor__area:empty::before { content: attr(data-placeholder); color: var(--s400); pointer-events: none; display: block; }
.nwsp-editor--compact .nwsp-editor__area { min-height: 90px; }
.nwsp-editor.is-drag { border-color: var(--b500); background: var(--b50); }
.nwsp-body h2 { font-size: calc(16px * var(--fs, 1)); font-weight: 800; margin: 8px 0; } .nwsp-body h3 { font-size: calc(14px * var(--fs, 1)); font-weight: 800; margin: 8px 0; }
.nwsp-body p { margin: 0 0 6px; } .nwsp-body ul, .nwsp-body ol { margin: 6px 0; padding-inline-start: 22px; } .nwsp-body ul { list-style: disc; } .nwsp-body ol { list-style: decimal; }
.nwsp-body blockquote { margin: 6px 0; padding: 4px 12px; border-inline-start: 3px solid var(--b400); color: var(--s600); background: var(--s50); border-radius: 6px; }
.nwsp-body pre { background: var(--s900); color: var(--b400); padding: 12px; border-radius: 10px; direction: ltr; text-align: left; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: calc(12px * var(--fs, 1)); overflow-x: auto; margin: 8px 0; white-space: pre-wrap; }
.nwsp-body code { font-family: ui-monospace, Menlo, Consolas, monospace; }
.nwsp-body table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: calc(12px * var(--fs, 1)); }
.nwsp-body th, .nwsp-body td { border: 1px solid var(--s300); padding: 5px 8px; } .nwsp-body th { background: var(--s100); }
.nwsp-body a { color: var(--b700); text-decoration: underline; word-break: break-all; }

/* Voice + attachments */
.nwsp-dual { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .nwsp-dual { grid-template-columns: 1fr 1fr; } }
.nwsp-voice { border: 1px solid var(--s200); background: rgba(248, 250, 252, .7); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.nwsp-voice__head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: calc(12px * var(--fs, 1)); color: var(--s700); }
.nwsp-voice__head span:first-child { display: inline-flex; gap: 6px; align-items: center; } .nwsp-voice__head svg { color: var(--b600); }
.nwsp-voice__timer { font-family: ui-monospace, Menlo, monospace; color: var(--s500); }
.nwsp-wave { display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 12px; }
.nwsp-wave i { width: 3px; border-radius: 999px; background: var(--b600); animation: nwsp-wave .8s ease-in-out infinite alternate; display: block; }
.nwsp-wave i:nth-child(1) { animation-delay: .1s; } .nwsp-wave i:nth-child(2) { animation-delay: .3s; } .nwsp-wave i:nth-child(3) { animation-delay: .5s; } .nwsp-wave i:nth-child(4) { animation-delay: .2s; } .nwsp-wave i:nth-child(5) { animation-delay: .4s; }
@keyframes nwsp-wave { 0% { height: 4px; } 100% { height: 20px; } }
.nwsp-rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rose-600); display: inline-block; }
.nwsp-voice.is-rec .nwsp-rec-dot { animation: nwsp-pulse 1s infinite; }
@keyframes nwsp-pulse { 50% { opacity: .3; } }
.nwsp-drop { position: relative; border: 2px dashed var(--s300); border-radius: 16px; background: rgba(248, 250, 252, .7); padding: 16px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: .15s; cursor: pointer; min-height: 110px; }
.nwsp-drop:hover, .nwsp-drop.is-drag { border-color: var(--b500); background: rgba(236, 253, 245, .4); }
.nwsp-drop__ico { width: 36px; height: 36px; border-radius: 12px; background: var(--surface, #fff); color: var(--b600); border: 1px solid var(--s200); display: inline-flex; align-items: center; justify-content: center; font-size: calc(17px * var(--fs, 1)); box-shadow: var(--shadow); margin-bottom: 4px; }
.nwsp-drop strong { font-size: calc(12px * var(--fs, 1)); color: var(--s700); }
.nwsp-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.nwsp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nwsp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 10px; background: var(--b50); border: 1px solid var(--b200); color: var(--b800); font-size: calc(11px * var(--fs, 1)); font-weight: 600; max-width: 100%; }
.nwsp-chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; }
.nwsp-chip span.n { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nwsp-chip button { border: 0; background: none; color: var(--b600); display: inline-flex; padding: 0; }
.nwsp-chip button:hover { color: var(--rose-600); }
.nwsp-chip--link { text-decoration: none; }
.nwsp-chip--link:hover { background: var(--b100); }
.nwsp-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--s200); }
.nwsp-atts img.thumb { max-width: 220px; max-height: 160px; border-radius: 12px; border: 1px solid var(--s200); display: block; }
.nwsp-atts audio { height: 36px; max-width: 100%; }

/* Thread */
.nwsp-threadhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding: 18px 22px; margin-bottom: 18px; }
.nwsp-threadhead__l { display: flex; gap: 12px; align-items: flex-start; }
.nwsp-threadhead h2 { font-size: calc(15px * var(--fs, 1)); font-weight: 800; }
.nwsp-threadhead__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nwsp-threadhead__meta { font-size: calc(11px * var(--fs, 1)); color: var(--s400); display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.nwsp-threadhead__meta b { color: var(--s700); }
.nwsp-threadhead__act { display: flex; gap: 8px; flex-wrap: wrap; }
.nwsp-cols { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1024px) { .nwsp-cols { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); } }
.nwsp-msgs > * + * { margin-top: 14px; }
.nwsp-msg { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.nwsp-msg__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--s100); }
.nwsp-msg__who { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: calc(12px * var(--fs, 1)); }
.nwsp-msg__who img { width: 30px; height: 30px; border-radius: 50%; }
.nwsp-msg__time { font-size: calc(11px * var(--fs, 1)); color: var(--s400); font-family: ui-monospace, Menlo, monospace; }
.nwsp-msg--agent { background: rgba(236, 253, 245, .55); border-color: var(--b200); }
.nwsp-msg--agent .nwsp-msg__head { border-color: var(--b100); } .nwsp-msg--agent .nwsp-msg__who { color: var(--b800); }
.nwsp-msg--note { background: var(--amber-50); border-color: var(--amber-200); }
.nwsp-msg--note .nwsp-msg__head { border-color: var(--amber-100); } .nwsp-msg--note .nwsp-msg__who { color: var(--amber-800); }
.nwsp-msg--system { background: transparent; border: 0; box-shadow: none; padding: 2px 10px; text-align: center; font-size: calc(11px * var(--fs, 1)); color: var(--s400); }
.nwsp-msg--system span { background: var(--s100); padding: 3px 12px; border-radius: 999px; display: inline-block; }
.nwsp-badge-note { background: var(--amber-100); color: var(--amber-800); font-size: calc(10px * var(--fs, 1)); padding: 1px 8px; border-radius: 6px; font-weight: 800; display: inline-flex; gap: 4px; align-items: center; }
.nwsp-reply { padding: 18px; margin-top: 16px; }
.nwsp-reply > * + * { margin-top: 12px; }
.nwsp-reply__tabs { display: flex; gap: 6px; }
.nwsp-reply__tabs button { border: 1px solid var(--s200); background: var(--surface, #fff); border-radius: 10px; padding: 6px 14px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s600); }
.nwsp-reply__tabs button.is-active { background: var(--b50); border-color: var(--b300, var(--b200)); color: var(--b800); }
.nwsp-reply__tabs button.is-active.note { background: var(--amber-50); border-color: var(--amber-200); color: var(--amber-800); }
.nwsp-reply__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.nwsp-reply__foot .grp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nwsp-closednote { text-align: center; padding: 22px; color: var(--s500); }
.nwsp-closednote .nwsp-btn { margin-top: 10px; }

/* Side panels */
.nwsp-side > * + * { margin-top: 16px; }
.nwsp-panel { padding: 16px; }
.nwsp-panel__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--s100); font-weight: 800; font-size: calc(12px * var(--fs, 1)); }
.nwsp-panel__head span:first-child { display: inline-flex; gap: 6px; align-items: center; } .nwsp-panel__head svg { color: var(--b600); }
.nwsp-kv { display: flex; justify-content: space-between; gap: 12px; font-size: calc(12px * var(--fs, 1)); padding: 4px 0; }
.nwsp-kv > span:first-child { color: var(--s400); flex-shrink: 0; } .nwsp-kv > :last-child { font-weight: 700; color: var(--s800); text-align: end; }
.nwsp-kv .mono { font-family: ui-monospace, Menlo, monospace; direction: ltr; }
.nwsp-field { margin-bottom: 10px; }
.nwsp-field label { display: block; font-size: calc(11px * var(--fs, 1)); font-weight: 700; color: var(--s600); margin-bottom: 4px; }
.nwsp-side .nwsp-select { width: 100%; }
.nwsp-ulist { margin: 4px 0 0; padding: 0; list-style: none; font-size: calc(12px * var(--fs, 1)); } .nwsp-ulist li { padding: 2px 0; color: var(--s700); }

/* Modal */
.nwsp-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.nwsp-modal__box { background: var(--surface, #fff); border-radius: 24px; width: 100%; max-width: 460px; padding: 22px; box-shadow: 0 25px 60px rgba(15, 23, 42, .3); animation: nwsp-pop .25s cubic-bezier(.16, 1, .3, 1); max-height: 92vh; overflow: auto; }
.nwsp-modal__box--wide { max-width: 640px; }
.nwsp-modal__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--s100); font-weight: 800; font-size: calc(14px * var(--fs, 1)); }
.nwsp-modal__head button { border: 0; background: none; color: var(--s400); }
.nwsp-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--s100); }
@keyframes nwsp-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.nwsp-success { text-align: center; padding: 10px 6px 4px; }
.nwsp-success__ico { width: 56px; height: 56px; border-radius: 18px; background: var(--b100); color: var(--b700); display: inline-flex; align-items: center; justify-content: center; font-size: calc(28px * var(--fs, 1)); margin-bottom: 10px; }
.nwsp-success h4 { font-size: calc(14px * var(--fs, 1)); font-weight: 800; } .nwsp-success p { font-size: calc(12px * var(--fs, 1)); color: var(--s500); margin-top: 4px; }
.nwsp-progress { height: 5px; background: var(--s100); border-radius: 999px; overflow: hidden; margin-top: 16px; }
.nwsp-progress i { display: block; height: 100%; background: var(--b500); animation: nwsp-shrink 3s linear forwards; }
@keyframes nwsp-shrink { from { width: 100%; } to { width: 0; } }

/* Toast */
.nwsp-toast { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .28); backdrop-filter: blur(3px); animation: nwsp-toast-bg .2s ease; cursor: pointer; }
.nwsp-toast.out { opacity: 0; transition: opacity .25s ease; }
.nwsp-toast__card { --tc: #16a34a; --tc-soft: #dcfce7; position: relative; overflow: hidden; width: min(340px, 100%); background: var(--surface, #fff); color: #0f172a; border-radius: 20px; padding: 28px 24px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); animation: nwsp-toast-pop .35s cubic-bezier(.2, 1.3, .4, 1); }
.nwsp-toast.err .nwsp-toast__card { --tc: #e11d48; --tc-soft: #ffe4e6; }
.nwsp-toast__icon { width: 60px; height: 60px; border-radius: 50%; background: var(--tc-soft); color: var(--tc); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; box-shadow: 0 0 0 8px color-mix(in srgb, var(--tc) 10%, transparent); }
.nwsp-toast__icon svg { width: 28px; height: 28px; color: var(--tc); }
.nwsp-toast__title { font-size: calc(16px * var(--fs, 1)); font-weight: 700; }
.nwsp-toast__msg { font-size: calc(13px * var(--fs, 1)); line-height: 1.7; color: #475569; }
.nwsp-toast__bar { position: absolute; inset-inline: 0; inset-block-end: 0; height: 4px; background: var(--tc); transform-origin: right; animation: nwsp-toast-bar var(--nwsp-toast-ms, 3200ms) linear forwards; }
[dir="ltr"] .nwsp-toast__bar { transform-origin: left; }
@keyframes nwsp-toast-bg { from { opacity: 0; } to { opacity: 1; } }
@keyframes nwsp-toast-pop { from { transform: scale(.85) translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nwsp-toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Floating widget */
.nwsp-root.nwsp-widget-root { position: fixed; inset-block-end: 24px; width: auto; max-width: none; z-index: 99990; }
.nwsp-root.nwsp-widget-root[data-position="end"] { inset-inline-end: 24px; }
.nwsp-root.nwsp-widget-root[data-position="start"] { inset-inline-start: 24px; }
/* Square icon-only launcher */
.nwsp-root button.nwsp-fab { display: flex !important; align-items: center; justify-content: center; width: 60px !important; min-width: 60px; height: 60px !important; min-height: 60px; padding: 0 !important; margin: 0; border: 0 !important; background: var(--b600) !important; color: #fff !important; border-radius: 10px !important; box-shadow: 0 10px 26px rgba(0, 0, 0, .22); transition: transform .15s; cursor: pointer; line-height: 1; }
.nwsp-root button.nwsp-fab:hover { background: var(--b700) !important; }
.nwsp-root button.nwsp-fab svg.i { width: 30px; height: 30px; stroke: #fff; stroke-width: 2; vertical-align: 0; }
.nwsp-root button.nwsp-fab:hover { transform: translateY(-2px); }
.nwsp-widget-panel { position: absolute; inset-block-end: 72px; width: min(400px, calc(100vw - 32px)); background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 22px; box-shadow: 0 25px 60px rgba(15, 23, 42, .25); overflow: hidden; animation: nwsp-pop .22s ease; }
.nwsp-widget-root[data-position="end"] .nwsp-widget-panel { inset-inline-end: 0; }
.nwsp-widget-root[data-position="start"] .nwsp-widget-panel { inset-inline-start: 0; }
.nwsp-widget-panel__head { background: linear-gradient(135deg, var(--b700), var(--b500)); color: #fff; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.nwsp-widget-panel__head button { border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.nwsp-widget-panel__body { padding: 16px 18px 18px; max-height: min(70vh, 560px); overflow: auto; }
.nwsp-widget-panel__body > * + * { margin-top: 12px; }

/* ====================================================================
   Admin pages (settings, departments, FAQ ...) - same look as the inbox
   ==================================================================== */
body.nwsp-admin-page { background: #f1f5f9; }
body.nwsp-admin-page #wpbody-content > .notice, body.nwsp-admin-page .update-nag { display: none !important; }
body.nwsp-admin-page #wpcontent { padding-inline-start: 0; }
.nwsp-apage { padding: 20px 24px 60px; width: 100%; max-width: none; box-sizing: border-box; }
.nwsp-apage * { box-sizing: border-box; }
.nwsp-apage a { color: var(--b700); }
.nwsp-apage h1, .nwsp-apage h2, .nwsp-apage h3, .nwsp-apage p { margin: 0; }
.nwsp-logo--lg { width: 48px; height: 48px; border-radius: 16px; }
.nwsp-pagehead__id { display: flex; align-items: center; gap: 14px; }
.nwsp-apage .nwsp-pagehead { padding-bottom: 18px; margin-bottom: 20px; }

/* layout: sidebar + panel */
.nwsp-sgrid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .nwsp-sgrid { grid-template-columns: 250px minmax(0, 1fr); } }
.nwsp-snav { padding: 10px; position: sticky; top: 44px; }
.nwsp-snav__group { font-size: calc(10px * var(--fs, 1)); font-weight: 800; letter-spacing: .4px; color: var(--s400); padding: 12px 12px 6px; }
.nwsp-snav__group:first-child { padding-top: 4px; }
.nwsp-snav__item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px; color: var(--s700) !important; text-decoration: none; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.nwsp-snav__item:hover { background: var(--s50); }
.nwsp-snav__ico { width: 32px; height: 32px; border-radius: 10px; background: var(--s100); color: var(--s600); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: .15s; }
.nwsp-snav__txt strong { font-size: calc(12px * var(--fs, 1)); font-weight: 700; }
.nwsp-snav__item.is-active { background: var(--b50); border-color: var(--b200); }
.nwsp-snav__item.is-active .nwsp-snav__ico { background: var(--b600); color: #fff; box-shadow: 0 6px 14px rgba(5, 150, 105, .25); }
.nwsp-snav__item.is-active strong { color: var(--b800); }
@media (max-width: 999px) { .nwsp-snav { position: static; display: flex; flex-wrap: wrap; gap: 4px; } .nwsp-snav__group { display: none; } }
/* A flex gap (not margins): .nwsp-card / .nwsp-hint reset their own margins, which made the boxes under the KPIs touch. */
.nwsp-spanel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.nwsp-spanel > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.nwsp-kpis--page { margin-bottom: 0; }
.nwsp-apage .nwsp-kpi { cursor: default; }

/* cards & sections */
.nwsp-apage .nwsp-card { padding: 22px; margin: 0; }
.nwsp-apage .nwsp-card:has(> .nwsp-table) { padding: 0; overflow: hidden; }
.nwsp-apage > .nwsp-card + .nwsp-card { margin-top: 18px; }
.nwsp-apage > .nwsp-card, .nwsp-apage > .nwsp-kpis { margin-bottom: 18px; }
.nwsp-apage .nwsp-form h2 { font-size: calc(15px * var(--fs, 1)); font-weight: 900; display: flex; align-items: center; gap: 10px; }
.nwsp-apage .nwsp-form h2::before { content: ''; width: 10px; height: 22px; border-radius: 999px; background: var(--b600); }
.nwsp-apage .nwsp-form { display: grid; gap: 16px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 760px) { .nwsp-apage .nwsp-form { grid-template-columns: minmax(0, 1fr); } }
.nwsp-apage .nwsp-form > h2, .nwsp-apage .nwsp-form > p, .nwsp-apage .nwsp-form > .nwsp-event, .nwsp-apage .nwsp-form > table, .nwsp-apage .nwsp-form > .nwsp-form__foot, .nwsp-apage .nwsp-form > .nwsp-field:has(textarea), .nwsp-apage .nwsp-form > .nwsp-field:has(> label > input[type="checkbox"]:only-child), .nwsp-apage .nwsp-form > .nwsp-field:has(.nwsp-hint) { grid-column: 1 / -1; }
.nwsp-apage .nwsp-form > .nwsp-field:has(.nwsp-hint) input:not([type="checkbox"]), .nwsp-apage .nwsp-form > .nwsp-field:has(.nwsp-hint) select { max-width: 520px; }
.nwsp-apage .nwsp-event { grid-column: 1 / -1; border: 1px solid var(--s200); border-radius: 16px; padding: 18px; background: linear-gradient(180deg, var(--s50), #fff 70px); display: grid; gap: 14px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 760px) { .nwsp-apage .nwsp-event { grid-template-columns: minmax(0, 1fr); } }
.nwsp-apage .nwsp-event > h3, .nwsp-apage .nwsp-event > p, .nwsp-apage .nwsp-event > table, .nwsp-apage .nwsp-event > div[style], .nwsp-apage .nwsp-event > .nwsp-event__matrix, .nwsp-apage .nwsp-event > .nwsp-field:has(textarea), .nwsp-apage .nwsp-event > label, .nwsp-apage .nwsp-event > .nwsp-field:has(.nwsp-hint) { grid-column: 1 / -1; }
.nwsp-apage .nwsp-event h3 { font-size: calc(13px * var(--fs, 1)); font-weight: 800; color: var(--s800); display: flex; align-items: center; gap: 8px; }
.nwsp-apage .nwsp-event h3::before { content: ''; width: 6px; height: 16px; border-radius: 999px; background: var(--b500); }
.nwsp-apage .nwsp-event__matrix { display: flex; gap: 10px; flex-wrap: wrap; }
.nwsp-apage .nwsp-event__cell { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; font-size: calc(12px * var(--fs, 1)); min-width: 110px; }
.nwsp-apage .nwsp-event__cell strong { color: var(--s800); }

/* fields */
.nwsp-apage .nwsp-field { margin: 0; }
.nwsp-apage .nwsp-field > label, .nwsp-apage .nwsp-field label { display: block; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s700); margin-bottom: 7px; }
.nwsp-apage input[type="text"], .nwsp-apage input[type="number"], .nwsp-apage input[type="url"], .nwsp-apage input[type="email"], .nwsp-apage input[type="password"], .nwsp-apage input[type="time"], .nwsp-apage select, .nwsp-apage textarea { width: 100%; max-width: none; background: var(--s50); border: 1px solid var(--s200); border-radius: 12px; padding: 10px 14px; font-size: calc(13px * var(--fs, 1)); color: var(--s900); box-shadow: none; min-height: 0; line-height: 1.6; transition: border-color .15s, background .15s, box-shadow .15s; font-family: inherit; }
.nwsp-apage input:focus, .nwsp-apage select:focus, .nwsp-apage textarea:focus { background: var(--surface, #fff); border-color: var(--b600); box-shadow: 0 0 0 3px rgba(5, 150, 105, .12); outline: none; }
.nwsp-apage select { appearance: none; -webkit-appearance: none; padding-inline-end: 38px; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: left 12px center; background-size: 15px; cursor: pointer; }
.nwsp-apage textarea { line-height: 1.9; resize: vertical; }
.nwsp-apage .nwsp-table input[type="number"], .nwsp-apage .nwsp-table input[type="text"], .nwsp-apage .nwsp-table select { max-width: 160px; padding: 7px 12px; }
.nwsp-apage code { background: var(--s100); color: var(--s700); padding: 1px 7px; border-radius: 6px; font-size: calc(11px * var(--fs, 1)); }
.nwsp-apage .nwsp-hint { font-size: calc(12px * var(--fs, 1)); color: var(--s500); line-height: 1.9; margin-top: 6px; }
.nwsp-apage .nwsp-spanel > p.nwsp-hint, .nwsp-apage > p.nwsp-hint, .nwsp-apage .nwsp-form > p.nwsp-hint { background: var(--sky-50); border: 1px solid var(--sky-100); color: var(--sky-800); padding: 11px 16px; border-radius: 14px; margin: 0; }

/* switches (every checkbox becomes a toggle) */
.nwsp-apage input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; min-width: 38px; border-radius: 999px; background: var(--s300); border: 0; position: relative; cursor: pointer; margin: 0; transition: background .18s; vertical-align: middle; box-shadow: none; flex-shrink: 0; }
.nwsp-apage input[type="checkbox"]::before { display: none !important; content: none !important; }
.nwsp-apage input[type="checkbox"]::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface, #fff); box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: inset-inline-start .18s; }
.nwsp-apage input[type="checkbox"]:checked { background: var(--b600); }
.nwsp-apage input[type="checkbox"]:checked::after { inset-inline-start: 19px; }
.nwsp-apage input[type="checkbox"]:focus-visible { outline: 2px solid var(--b600); outline-offset: 2px; }
.nwsp-apage label:has(> input[type="checkbox"]) { display: inline-flex !important; align-items: center; gap: 10px; cursor: pointer; font-weight: 600 !important; margin-bottom: 0 !important; }
.nwsp-apage .nwsp-field > label:has(> input[type="checkbox"]):only-child { padding: 12px 14px; border: 1px solid var(--s200); border-radius: 14px; background: var(--surface, #fff); width: 100%; transition: border-color .15s, background .15s; }
.nwsp-apage .nwsp-field > label:has(> input[type="checkbox"]:checked):only-child { border-color: var(--b200); background: var(--b50); }

/* tables */
.nwsp-apage .nwsp-table { width: 100%; border-collapse: collapse; font-size: calc(12px * var(--fs, 1)); }
.nwsp-apage .nwsp-table th { background: rgba(248, 250, 252, .9); color: var(--s600); font-weight: 800; padding: 14px 16px; border-bottom: 1px solid var(--s200); text-align: start; white-space: nowrap; }
.nwsp-apage .nwsp-table td { padding: 14px 16px; border-bottom: 1px solid var(--s100); vertical-align: middle; color: var(--s700); text-align: start; }
.nwsp-apage .nwsp-table tr:last-child td { border-bottom: 0; }
.nwsp-apage .nwsp-table tbody tr:hover td { background: rgba(248, 250, 252, .8); }
.nwsp-apage .nwsp-event > .nwsp-table { border: 1px solid var(--s200); border-radius: 12px; overflow: hidden; background: var(--surface, #fff); }
.nwsp-apage .nwsp-actions { display: flex; gap: 8px; align-items: center; }
.nwsp-apage td .nwsp-actions, .nwsp-apage td.nwsp-actions { justify-content: flex-start; }
.nwsp-apage .nwsp-btn { cursor: pointer; }

/* sticky save bar */
.nwsp-apage .nwsp-form__foot { position: sticky; bottom: 14px; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; padding: 12px 16px; margin-top: 6px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border: 1px solid var(--s200); border-radius: 16px; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }

/* messages */
.nwsp-apage .nwsp-flash { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; margin-bottom: 18px; font-weight: 700; font-size: calc(12px * var(--fs, 1)); animation: nwsp-pop .25s ease; }
.nwsp-apage .nwsp-flash--ok { background: var(--b50); border: 1px solid var(--b200); color: var(--b800); }
.nwsp-apage .nwsp-flash--err { background: var(--rose-50); border: 1px solid var(--rose-200); color: var(--rose-800); }

/* range pills (ratings) */
.nwsp-apage .nwsp-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.nwsp-apage .nwsp-tab { padding: 8px 18px; border-radius: 12px; background: var(--surface, #fff); border: 1px solid var(--s200); color: var(--s700) !important; text-decoration: none; font-weight: 700; font-size: calc(12px * var(--fs, 1)); transition: .15s; }
.nwsp-apage .nwsp-tab:hover { border-color: var(--b400); }
.nwsp-apage .nwsp-tab.is-active { background: var(--b600); border-color: var(--b600); color: #fff !important; box-shadow: 0 6px 14px rgba(5, 150, 105, .22); }
.nwsp-apage .nwsp-pill { margin: 0; }

@media (max-width: 640px) {
	.nwsp-root[data-mode="admin"] { padding: 6px; }
	.nwsp-formcard { padding: 18px; }
	.nwsp-ticket__side { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .nwsp-root * { animation-duration: .01ms !important; } }

.nwsp-root svg.i.flip { transform: scaleX(-1); }

/* Phase 2 */
@media (min-width: 1024px) { .nwsp-kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.nwsp-kb { margin-top: 10px; border: 1px solid var(--b200); background: rgba(236, 253, 245, .7); border-radius: 14px; padding: 12px; }
.nwsp-kb__head { display: flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fs, 1)); font-weight: 800; color: var(--b800); margin-bottom: 8px; }
.nwsp-kb__item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: start; background: var(--surface, #fff); border: 1px solid var(--b100); border-radius: 10px; padding: 8px 12px; margin-top: 6px; }
.nwsp-kb__item:hover { border-color: var(--b500); }
.nwsp-kb__item strong { font-size: calc(12px * var(--fs, 1)); color: var(--s900); } .nwsp-kb__item span { font-size: calc(11px * var(--fs, 1)); color: var(--s500); }
.nwsp-csat { margin-top: 14px; padding: 18px; text-align: center; }
.nwsp-csat > * + * { margin-top: 10px; }
.nwsp-csat h4 { font-size: calc(13px * var(--fs, 1)); font-weight: 800; }
.nwsp-csat--done { display: flex; flex-direction: column; align-items: center; color: var(--s600); }
.nwsp-stars { display: inline-flex; gap: 4px; direction: ltr; }
.nwsp-star, .nwsp-stars--static span { font-size: calc(28px * var(--fs, 1)); line-height: 1; color: var(--s300); background: none; border: 0; padding: 0 2px; transition: color .12s, transform .1s; }
.nwsp-stars--static span { font-size: calc(18px * var(--fs, 1)); cursor: default; }
.nwsp-star:hover { transform: scale(1.15); }
.nwsp-star.is-on, .nwsp-stars--static span.is-on { color: #f59e0b; }
.nwsp-star:focus-visible { outline: 2px solid var(--b600); border-radius: 6px; }
.nwsp-cols3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .nwsp-cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nwsp-bars > * + * { margin-top: 10px; }
.nwsp-bar { display: grid; grid-template-columns: 90px 1fr 32px; gap: 8px; align-items: center; font-size: calc(12px * var(--fs, 1)); }
.nwsp-bar__l { color: var(--s600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nwsp-bar__t { background: var(--s100); border-radius: 999px; height: 10px; overflow: hidden; }
.nwsp-bar__t i { display: block; height: 100%; background: var(--b500); border-radius: 999px; } .nwsp-bar__t i.violet { background: var(--violet-600); }
.nwsp-chart { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding-top: 8px; }
.nwsp-chart__col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.nwsp-chart__bar { width: 100%; max-width: 22px; min-height: 2px; background: linear-gradient(180deg, var(--b500), var(--b700)); border-radius: 5px 5px 2px 2px; }
.nwsp-chart__col small { font-size: calc(9px * var(--fs, 1)); color: var(--s400); height: 12px; white-space: nowrap; }

/* Phase 3 / 4 */
.nwsp-msg--ai { background: var(--violet-50); border-color: var(--violet-100); }
.nwsp-msg--ai .nwsp-msg__head { border-color: var(--violet-100); } .nwsp-msg--ai .nwsp-msg__who { color: var(--violet-800); }
.nwsp-badge-ai { background: var(--violet-100); color: var(--violet-800); font-size: calc(10px * var(--fs, 1)); padding: 1px 8px; border-radius: 6px; font-weight: 800; display: inline-flex; gap: 4px; align-items: center; }
.nwsp-ai { margin-top: 10px; border: 1px solid var(--violet-100); background: var(--violet-50); border-radius: 14px; padding: 12px; font-size: calc(12px * var(--fs, 1)); line-height: 2; }
.nwsp-ai .nwsp-kb__head { color: var(--violet-800); }
.nwsp-consent { display: flex; gap: 8px; align-items: flex-start; font-size: calc(11px * var(--fs, 1)); color: var(--s600); background: var(--s50); border: 1px solid var(--s200); border-radius: 12px; padding: 10px 12px; line-height: 1.9; cursor: pointer; }
.nwsp-consent svg { color: var(--b600); margin-top: 4px; }
.nwsp-aibar { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nwsp-btn.is-busy { opacity: .6; cursor: progress; }
.nwsp-btn.is-saving, .nwsp-dp-btn.is-saving, button.is-saving { opacity: .75; cursor: progress; pointer-events: none; display: inline-flex; align-items: center; gap: 8px; }
.is-saving .nwsp-spinner--sm { border-color: rgba(255, 255, 255, .45); border-top-color: #fff; }
.nwsp-btn--ghost.is-saving .nwsp-spinner--sm, .nwsp-dp-btn--ghost.is-saving .nwsp-spinner--sm { border-color: var(--b100); border-top-color: var(--b600); }
.nwsp-triage { border-color: var(--amber-200); background: var(--amber-50); }
.nwsp-audio { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nwsp-msgr { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 14px; font-size: calc(12px * var(--fs, 1)); color: var(--s600); }
.nwsp-msgr svg { color: var(--b600); }

/* Phase 2 (remaining) */
.nwsp-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--s400); font-size: calc(11px * var(--fs, 1)); }
.nwsp-or::before, .nwsp-or::after { content: ''; flex: 1; height: 1px; background: var(--s200); }
.nwsp-gate { display: flex; gap: 8px; }
.nwsp-gate .nwsp-input { flex: 1; text-align: center; letter-spacing: 2px; }
.nwsp-gform { display: flex; flex-direction: column; gap: 10px; position: relative; text-align: start; }
.nwsp-gfield { display: flex; flex-direction: column; gap: 4px; font-size: calc(12px * var(--fs, 1)); color: var(--s600); }
.nwsp-gfield small { color: var(--s400); }
.nwsp-trackin { text-align: center; letter-spacing: 2px; text-transform: uppercase; }
.nwsp-trackcode { margin: 10px auto; padding: 12px 16px; max-width: 280px; text-align: center; border: 2px dashed var(--b600); border-radius: 12px; background: var(--s50); color: var(--b700); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: calc(20px * var(--fs, 1)); font-weight: 800; letter-spacing: 2px; user-select: all; }
.nwsp-success__act { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.nwsp-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 12px; }
.nwsp-recent small { color: var(--s400); width: 100%; }
.nwsp-guestbox { margin: 8px 0 12px; padding: 10px; border-radius: 10px; background: var(--s50); }
.nwsp-gate__err { margin-top: 8px; font-size: calc(12px * var(--fs, 1)); color: var(--rose-700); }
.nwsp-link { background: none; border: 0; color: var(--b700); text-decoration: underline; font-size: calc(12px * var(--fs, 1)); padding: 0; }
.nwsp-hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.nwsp-badge-n { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; margin-inline-start: 6px; border-radius: 999px; background: var(--rose-600); color: #fff; font-size: calc(10px * var(--fs, 1)); font-weight: 800; align-items: center; justify-content: center; }
.nwsp-widget-tabs { display: flex; background: var(--s50); border-bottom: 1px solid var(--s200); }
.nwsp-widget-tabs button { flex: 1; padding: 10px; border: 0; background: none; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s500); border-bottom: 2px solid transparent; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.nwsp-widget-tabs button.is-active { color: var(--b700); border-bottom-color: var(--b600); background: var(--surface, #fff); }
.nwsp-chat__welcome { background: var(--b50); border: 1px solid var(--b100); border-radius: 12px; padding: 10px 12px; font-size: calc(12px * var(--fs, 1)); color: var(--b800); margin-bottom: 10px; }
.nwsp-chat__off { background: var(--amber-50); border: 1px solid var(--amber-200); border-radius: 12px; padding: 12px; font-size: calc(12px * var(--fs, 1)); color: var(--amber-800); line-height: 2; }
.nwsp-chat__start { display: flex; flex-direction: column; gap: 8px; }
.nwsp-chat__log { height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 8px; }
.nwsp-chat__log--agent { height: 380px; padding: 12px; background: var(--s50); border-radius: 12px; margin: 10px 0; }
.nwsp-chat__send { display: flex; gap: 6px; margin-top: 8px; }
.nwsp-bubble { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: calc(12px * var(--fs, 1)); line-height: 1.9; word-break: break-word; display: flex; flex-direction: column; }
.nwsp-bubble small { font-size: calc(10px * var(--fs, 1)); opacity: .7; font-weight: 700; }
.nwsp-bubble--me { align-self: flex-start; background: var(--b600); color: #fff; border-end-start-radius: 4px; }
.nwsp-bubble--agent { align-self: flex-end; background: var(--surface, #fff); border: 1px solid var(--s200); color: var(--s800); border-end-end-radius: 4px; }
.nwsp-chats { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .nwsp-chats { grid-template-columns: 300px 1fr; } }
.nwsp-chats__list { padding: 8px; max-height: 560px; overflow-y: auto; }
.nwsp-chats__view { padding: 16px; min-height: 420px; }
.nwsp-chats__tabs { display: flex; gap: 6px; padding: 4px 4px 10px; }
.nwsp-chats__tabs button { flex: 1; padding: 6px; border: 1px solid var(--s200); background: var(--surface, #fff); border-radius: 10px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s600); }
.nwsp-chats__tabs button.is-active { background: var(--b50); border-color: var(--b200); color: var(--b800); }
.nwsp-chats__item { display: flex; flex-direction: column; width: 100%; text-align: start; gap: 2px; border: 1px solid transparent; background: none; border-radius: 12px; padding: 10px 12px; }
.nwsp-chats__item:hover, .nwsp-chats__item.is-on { background: var(--b50); border-color: var(--b100); }
.nwsp-chats__item span { font-size: calc(12px * var(--fs, 1)); color: var(--s500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .nwsp-chats__item small { font-size: calc(10px * var(--fs, 1)); color: var(--s400); }
.nwsp-chats__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.nwsp-chats__act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Layout fix: the root has padding in admin mode, so it must size by border-box (otherwise it overflows the page). */
.nwsp-root { box-sizing: border-box; max-width: 100%; }
.nwsp-root[data-mode="admin"] { overflow-x: clip; }
.nwsp-toolbar__group { min-width: 0; }
.nwsp-toolbar .nwsp-select { max-width: 100%; }
body.nwsp-app-page #wpbody-content { overflow-x: hidden; }

/* Customer picker (agent "new ticket") */
.nwsp-picker { position: relative; }
.nwsp-picker__list { position: absolute; inset-inline: 0; top: 100%; z-index: 20; margin-top: 4px; background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 12px; box-shadow: 0 12px 30px rgba(15, 23, 42, .12); max-height: 260px; overflow: auto; }
.nwsp-picker__list button { display: flex; flex-direction: column; width: 100%; text-align: start; gap: 1px; border: 0; background: none; padding: 9px 14px; }
.nwsp-picker__list button:hover { background: var(--b50); }
.nwsp-picker__list small { color: var(--s400); font-size: calc(11px * var(--fs, 1)); }
.nwsp-picker__sel { margin-top: 6px; font-size: calc(12px * var(--fs, 1)); color: var(--b800); background: var(--b50); border: 1px solid var(--b100); border-radius: 10px; padding: 6px 12px; display: inline-flex; gap: 6px; align-items: center; }
.nwsp-apage > p.nwsp-hint { margin-bottom: 18px; }
.nwsp-apage > .nwsp-nav, .nwsp-apage > form.nwsp-card { margin-bottom: 18px; }

/* ---- Settings screens: sidebar brand, top bar, section cards and setting rows ---- */
.nwsp-snav__brand { display: flex; align-items: center; gap: 12px; padding: 8px 8px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--s100); }
.nwsp-snav__brand strong { display: block; font-size: calc(13px * var(--fs, 1)); font-weight: 900; line-height: 1.5; }
.nwsp-snav__ver { display: flex; align-items: center; gap: 8px; font-size: calc(11px * var(--fs, 1)); color: var(--s500); }
.nwsp-snav__ver em { font-style: normal; color: var(--b700); font-weight: 800; }
.nwsp-snav__help { display: block; margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--s900); color: #fff !important; text-decoration: none; }
.nwsp-snav__help strong { display: flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fs, 1)); }
.nwsp-snav__help span { display: block; font-size: calc(11px * var(--fs, 1)); color: var(--s300); margin-top: 4px; }
.nwsp-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 16px; box-shadow: var(--shadow); }
.nwsp-topbar__sp { flex: 1; }
.nwsp-topbar__search { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; max-width: 420px; padding: 0 14px; border: 1px solid var(--s200); border-radius: 12px; background: var(--s50); color: var(--s400); }
.nwsp-topbar__search input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 9px 0 !important; width: 100%; }
.nwsp-inline { display: inline-flex; margin: 0; }
.nwsp-btn--danger { background: var(--rose-50); border: 1px solid var(--rose-200); color: var(--rose-700) !important; }
.nwsp-btn--plain { background: transparent; border: 0; color: var(--s500) !important; }
.nwsp-code { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; background: var(--amber-50); border: 1px solid var(--amber-200); color: var(--amber-800); font-size: calc(12px * var(--fs, 1)); }
.nwsp-code code { background: var(--surface, #fff); color: var(--amber-800); }
/* A flex gap (not margins) so cards inside display:contents wrappers (.nwsp-when) are spaced too. */
.nwsp-formstack { display: flex !important; flex-direction: column; gap: 18px; grid-column: 1 / -1; }
.nwsp-apage .nwsp-form:has(> .nwsp-formstack) { display: block; padding: 0; background: transparent; border: 0; box-shadow: none; }
.nwsp-formstack > * { margin-top: 0; margin-bottom: 0; }
.nwsp-sec { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.nwsp-sec > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--s100); }
.nwsp-sec h2 { display: flex; align-items: center; gap: 10px; font-size: calc(14px * var(--fs, 1)); font-weight: 700; margin: 0; }
.nwsp-apage .nwsp-form .nwsp-sec h2::before { display: none; }
.nwsp-sec__ico { width: 30px; height: 30px; border-radius: 10px; background: var(--b50); color: var(--b700); display: inline-flex; align-items: center; justify-content: center; }
.nwsp-sec__tag { font-size: calc(11px * var(--fs, 1)); color: var(--s400); }
.nwsp-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 18px 22px; border-top: 1px solid var(--s100); }
.nwsp-sec > header + .nwsp-row { border-top: 0; }
.nwsp-row[hidden], .nwsp-sec[hidden] { display: none; }
.nwsp-sec__body { padding: 4px 22px 22px; border-top: 1px solid var(--s100); }
.nwsp-sec__body[hidden] { display: none; }
.nwsp-sec__body .nwsp-hint { margin: 14px 0; }
.nwsp-sec__body .nwsp-table { border: 1px solid var(--s200); border-radius: 12px; overflow: hidden; background: var(--surface, #fff); }
.nwsp-row--sub { background: var(--s50); margin: 0 22px 14px; border: 1px solid var(--s100); border-radius: 14px; padding: 14px 16px; }
.nwsp-row__txt { flex: 1 1 280px; min-width: 0; }
.nwsp-row__txt strong { display: block; font-size: calc(13.5px * var(--fs, 1)); font-weight: 500; color: var(--s900); letter-spacing: 0; }
.nwsp-row__txt span { display: block; margin-top: 4px; font-size: calc(12px * var(--fs, 1)); font-weight: 400; color: var(--s500); line-height: 1.9; }
.nwsp-row__ctl { flex: 0 1 380px; min-width: 220px; display: flex; justify-content: flex-start; }
.nwsp-row__ctl:has(> .nwsp-switch:only-child) { flex: 0 0 auto; min-width: 0; }
.nwsp-row__ctl select, .nwsp-row__ctl textarea, .nwsp-row__ctl input[type="number"] { width: 100%; }
.nwsp-switch { display: inline-flex !important; align-items: center; gap: 10px; }
.nwsp-state { font-size: calc(11px * var(--fs, 1)); font-weight: 800; padding: 3px 12px; border-radius: 999px; }
.nwsp-state.is-on { background: var(--b50); color: var(--b700); border: 1px solid var(--b200); }
.nwsp-state.is-off { background: var(--rose-50); color: var(--rose-700); border: 1px solid var(--rose-200); }
.nwsp-unit { position: relative; display: block; width: 160px; }
.nwsp-unit em { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: calc(11px * var(--fs, 1)); color: var(--s400); }
.nwsp-unit input, .nwsp-apage .nwsp-unit input[type="number"] { width: 100%; padding-inline-start: 58px; box-sizing: border-box; }
.nwsp-chipset { display: flex; flex-wrap: wrap; gap: 8px; max-height: 190px; overflow: auto; padding: 2px; }
.nwsp-chipopt { margin: 0 !important; display: inline-flex !important; cursor: pointer; }
.nwsp-apage .nwsp-chipopt input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; min-width: 0; }
.nwsp-chipopt span { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--s200); background: var(--surface, #fff); color: var(--s600); font-size: calc(12px * var(--fs, 1)); font-weight: 700; transition: .15s; }
.nwsp-chipopt input:checked + span { background: var(--b600); border-color: var(--b600); color: #fff; }
.nwsp-chipopt input:disabled + span { opacity: .75; cursor: default; }
.nwsp-chipopt input:focus-visible + span { outline: 2px solid var(--b600); outline-offset: 2px; }
.nwsp-media { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 1px dashed var(--s300); border-radius: 14px; background: var(--s50); }
.nwsp-media span { flex: 1; font-size: calc(12px * var(--fs, 1)); color: var(--s500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nwsp-media img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: var(--surface, #fff); }
.nwsp-dual--one { grid-template-columns: 1fr !important; }
.nwsp-root .nwsp-fab--img { background: transparent !important; box-shadow: none; overflow: hidden; }
.nwsp-root .nwsp-fab--img:hover { background: transparent !important; }
.nwsp-root .nwsp-fab__img { width: 60px; height: 60px; object-fit: cover !important; border-radius: 10px; max-width: none;}
@media (max-width: 760px) { .nwsp-row__ctl { flex-basis: 100%; } .nwsp-sec > header { padding: 14px 16px; } .nwsp-row { padding: 16px; } .nwsp-row--sub { margin: 0 12px 12px; } }


/* ============ New ticket page ============ */
.nwsp-newpage { display: block; }
.nwsp-np-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 20px; padding: 16px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.nwsp-np-head__r { display: flex; align-items: center; gap: 14px; }
.nwsp-np-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--b50); border: 1px solid var(--b200); color: var(--b700); display: inline-flex; align-items: center; justify-content: center; font-size: calc(22px * var(--fs, 1)); }
.nwsp-np-head__t { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nwsp-np-head h2 { font-size: calc(18px * var(--fs, 1)); font-weight: 900; }
.nwsp-np-head p { font-size: calc(12px * var(--fs, 1)); color: var(--s500); margin-top: 3px; }
.nwsp-np-head__l { display: flex; gap: 10px; align-items: center; }
.nwsp-np-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--b50); border: 1px solid var(--b200); color: var(--b800); padding: 2px 12px; border-radius: 999px; font-size: calc(11px * var(--fs, 1)); font-weight: 700; }
.nwsp-np-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--b500); display: inline-block; }
.nwsp-np-body { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .nwsp-np-body { grid-template-columns: minmax(0, 1fr) 340px; } }
.nwsp-np-main > * + *, .nwsp-np-side > * + * { margin-top: 20px; }
.nwsp-np-card { padding: 22px 24px; border-radius: 20px; }
.nwsp-np-card > * + * { margin-top: 18px; }
.nwsp-np-card__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--s100); margin-top: 0 !important; }
.nwsp-np-card__h--wrap { flex-wrap: wrap; }
.nwsp-np-card__h h3 { font-size: calc(14px * var(--fs, 1)); font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.nwsp-np-card__h h3 svg { color: var(--b600); }
.nwsp-np-req { font-size: calc(11px * var(--fs, 1)); color: var(--rose-600); }
.nwsp-np-card .nwsp-field { margin-bottom: 0; }
.nwsp-np-card .nwsp-label { font-size: calc(12px * var(--fs, 1)); margin-bottom: 7px; }
.nwsp-np-card .nwsp-input, .nwsp-np-card .nwsp-select { background-color: var(--surface, #fff); border-radius: 14px; }
.nwsp-np-card .nwsp-input:focus, .nwsp-np-card .nwsp-select:focus { background-color: var(--surface, #fff); }
/* Dropdowns get a clearly visible chevron so people know they open a list. */
.nwsp-np-card .nwsp-select { background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: left 14px center; background-size: 16px; padding-inline-end: 38px; cursor: pointer; }
.nwsp-root[dir="ltr"] .nwsp-np-card .nwsp-select { background-position: right 14px center; }
.nwsp-np-card .nwsp-select:hover { border-color: var(--b400); }
.nwsp-iconfield { position: relative; }
.nwsp-iconfield > svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--s400); pointer-events: none; z-index: 1; }
.nwsp-iconfield > .nwsp-input, .nwsp-iconfield > .nwsp-select { padding-inline-start: 42px !important; }
.nwsp-iconfield > .nwsp-select { background-position: left 12px center; }
.nwsp-np-card .nwsp-select { width: 100%; }
.nwsp-np-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nwsp-chipbtn { display: inline-flex; align-items: center; gap: 6px; background: var(--b50); border: 1px solid var(--b200); color: var(--b800); border-radius: 12px; padding: 7px 14px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; }
.nwsp-chipbtn:hover { background: var(--b100); }
.nwsp-viewtabs { display: inline-flex; background: var(--s100); border: 1px solid var(--s200); border-radius: 12px; padding: 3px; }
.nwsp-viewtabs button { border: 0; background: none; padding: 5px 14px; border-radius: 9px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s500); }
.nwsp-viewtabs button.is-on { background: var(--surface, #fff); color: var(--s900); box-shadow: var(--shadow); }
.nwsp-html { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: calc(12px * var(--fs, 1)); line-height: 1.7; }
.nwsp-np-card .nwsp-editor { border-radius: 16px; }
.nwsp-np-card .nwsp-editor__area { min-height: 260px; max-height: 520px; }
.nwsp-drop--big { padding: 34px 20px; min-height: 170px; background: var(--surface, #fff); border-radius: 18px; border-color: var(--b200); }
.nwsp-drop--big .nwsp-drop__ico { width: 46px; height: 46px; border-radius: 50%; font-size: calc(21px * var(--fs, 1)); margin-bottom: 8px; }
.nwsp-drop--big strong b { color: var(--b700); }
.nwsp-drop--big strong { font-weight: 600; font-size: calc(13px * var(--fs, 1)); }

/* priority segments */
.nwsp-segs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nwsp-seg { border: 1px solid var(--s200); background: var(--surface, #fff); border-radius: 12px; padding: 9px 4px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s600); transition: .15s; }
.nwsp-seg:hover { border-color: var(--s300); }
.nwsp-seg--critical { border-color: var(--rose-200); color: var(--rose-700); } .nwsp-seg--high { border-color: var(--amber-200); color: var(--amber-700); }
.nwsp-seg.is-on { background: var(--b600); border-color: var(--b600); color: #fff; box-shadow: 0 6px 14px rgba(5, 150, 105, .25); }
.nwsp-seg--critical.is-on { background: var(--rose-600); border-color: var(--rose-600); box-shadow: 0 6px 14px rgba(225, 29, 72, .25); }
.nwsp-seg--high.is-on { background: var(--amber-600); border-color: var(--amber-600); box-shadow: 0 6px 14px rgba(217, 119, 6, .25); }
.nwsp-seg--low.is-on { background: var(--s600); border-color: var(--s600); box-shadow: none; }

/* notification rows */
.nwsp-notify { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--s200); border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: .15s; }
.nwsp-notify + .nwsp-notify { margin-top: 10px; }
.nwsp-notify:hover { border-color: var(--b200); background: var(--b50); }
.nwsp-notify.is-off { opacity: .6; cursor: not-allowed; }
.nwsp-notify > span { display: flex; flex-direction: column; gap: 1px; flex: 1; font-size: calc(12px * var(--fs, 1)); position: relative; padding-inline-start: 26px; }
.nwsp-notify > span > svg { position: absolute; inset-inline-start: 0; top: 3px; color: var(--b600); }
.nwsp-notify small { color: var(--s400); font-size: calc(11px * var(--fs, 1)); }
.nwsp-notify input { order: 2; margin-top: 3px; }

/* tags */
.nwsp-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.nwsp-tags--ro { margin-top: 6px; }
.nwsp-tagchip { border: 1px solid var(--s200); background: var(--s100); color: var(--s600); border-radius: 10px; padding: 5px 12px; font-size: calc(12px * var(--fs, 1)); font-weight: 600; }
.nwsp-tagchip:hover { border-color: var(--b200); }
.nwsp-tagchip.is-on { background: var(--b50); border-color: var(--b200); color: var(--b800); }
.nwsp-tagchip--add { background: var(--surface, #fff); border-style: dashed; border-color: var(--b400); color: var(--b700); }
.nwsp-ctx { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: calc(12px * var(--fs, 1)); margin: 0; } .nwsp-ctx dt { color: var(--s400); } .nwsp-ctx dd { margin: 0; word-break: break-all; color: var(--s700); }
.nwsp-ctxon { font-size: calc(11px * var(--fs, 1)); display: inline-flex; gap: 6px; align-items: center; color: var(--s500); }
.nwsp-tips { margin: 0; padding-inline-start: 20px; line-height: 2.1; font-size: calc(13px * var(--fs, 1)); color: var(--s700); } .nwsp-tips li + li { margin-top: 6px; }

/* sticky action bar */
.nwsp-np-bar { grid-column: 1 / -1; position: sticky; bottom: 12px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border: 1px solid var(--s200); border-radius: 20px; padding: 12px 18px; box-shadow: 0 14px 40px rgba(15, 23, 42, .12); }
.nwsp-np-bar__r { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: calc(12px * var(--fs, 1)); color: var(--s500); }
.nwsp-np-bar__l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nwsp-np-secure { display: inline-flex; gap: 6px; align-items: center; background: var(--b50); border: 1px solid var(--b200); color: var(--b800); padding: 4px 12px; border-radius: 10px; font-size: calc(11px * var(--fs, 1)); font-weight: 700; }
.nwsp-np-secure.is-plain { background: var(--s100); border-color: var(--s200); color: var(--s600); }
.nwsp-btn--plain { background: transparent; color: var(--s600) !important; } .nwsp-btn--plain:hover { background: var(--s100); }
.nwsp-btn--tint { background: var(--b50); border-color: var(--b200); color: var(--b800) !important; } .nwsp-btn--tint:hover { background: var(--b100); }
@media (max-width: 640px) { .nwsp-np-card { padding: 16px; } .nwsp-np-bar { position: static; } .nwsp-np-bar__l { width: 100%; } .nwsp-np-bar__l .nwsp-btn { flex: 1; } }

/* Side-card explanations and the inline tag input */
.nwsp-help { font-size: calc(12px * var(--fs, 1)); line-height: 2; color: var(--s500); background: var(--s50); border: 1px solid var(--s100); border-radius: 12px; padding: 8px 12px; margin: 0; }
.nwsp-opt { font-size: calc(11px * var(--fs, 1)); font-weight: 500; color: var(--s400); }
.nwsp-taginput { display: flex; gap: 8px; }
.nwsp-taginput .nwsp-input { flex: 1; }
.nwsp-tags--sel { min-height: 30px; align-items: center; }
.nwsp-tags--sel .nwsp-tagchip span { opacity: .6; margin-inline-start: 4px; }
.nwsp-tags--sel .nwsp-tagchip:hover span { opacity: 1; color: var(--rose-600); }

/* ============ Departments page ============ */
.nwsp-dp { font-family: inherit; color: var(--s900); }
.nwsp-dp > * + * { margin-top: 20px; }
.nwsp-dp h1, .nwsp-dp h2 { margin: 0; }
.nwsp-dp-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 22px; padding: 26px 28px; box-shadow: var(--shadow); }
.nwsp-dp-head__r { display: flex; align-items: center; gap: 18px; flex: 1; min-width: 300px; }
.nwsp-dp-hico { width: 66px; height: 66px; border-radius: 18px; background: var(--b50); border: 1px solid var(--b200); color: var(--b700); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nwsp-dp-head__t { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nwsp-dp-head h1 { font-size: calc(24px * var(--fs, 1)); font-weight: 900; }
.nwsp-dp-head p { margin: 8px 0 0; font-size: calc(13px * var(--fs, 1)); line-height: 2; color: var(--s500); max-width: 640px; }
.nwsp-dp-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--b50); border: 1px solid var(--b200); color: var(--b800); padding: 3px 14px; border-radius: 999px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; }
.nwsp-dp-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--b500); }
.nwsp-dp-head__l { display: flex; gap: 12px; flex-wrap: wrap; }
.nwsp-dp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 14px; padding: 12px 22px; font-size: calc(13px * var(--fs, 1)); font-weight: 800; text-decoration: none; cursor: pointer; transition: .15s; line-height: 1.4; font-family: inherit; }
.nwsp-dp-btn--primary { background: var(--b600); color: #fff !important; box-shadow: 0 8px 18px rgba(5, 150, 105, .25); } .nwsp-dp-btn--primary:hover { background: var(--b700); }
.nwsp-dp-btn--ghost { background: var(--surface, #fff); border-color: var(--s200); color: var(--s700) !important; } .nwsp-dp-btn--ghost:hover { background: var(--s50); }
.nwsp-dp-btn--soft { background: var(--s100); border-color: var(--s200); color: var(--s700) !important; } .nwsp-dp-btn--soft:hover { background: var(--s200); }
.nwsp-dp-btn--plain { background: transparent; color: var(--s700) !important; } .nwsp-dp-btn--plain:hover { background: var(--s100); }
.nwsp-dp-btn--sm { padding: 8px 16px; font-size: calc(12px * var(--fs, 1)); border-radius: 12px; }
.nwsp-dp-btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

.nwsp-dp-stats { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .nwsp-dp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nwsp-dp-stat { display: flex; align-items: center; gap: 18px; background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 20px; padding: 22px 24px; box-shadow: var(--shadow); }
.nwsp-dp-stat__ico { width: 58px; height: 58px; border-radius: 16px; background: var(--s100); color: var(--s600); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nwsp-dp-stat:nth-child(2) .nwsp-dp-stat__ico, .nwsp-dp-stat:nth-child(3) .nwsp-dp-stat__ico { background: var(--b50); color: var(--b700); }
.nwsp-dp-stat__l { font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s500); display: block; }
.nwsp-dp-stat__v { display: flex; align-items: baseline; gap: 10px; margin: 2px 0; }
.nwsp-dp-stat__v b { font-size: calc(34px * var(--fs, 1)); font-weight: 900; line-height: 1.2; }
.nwsp-dp-stat__v em { font-style: normal; font-size: calc(11px * var(--fs, 1)); font-weight: 800; color: var(--b700); background: var(--b50); border: 1px solid var(--b200); border-radius: 999px; padding: 1px 10px; }
.nwsp-dp-stat small { font-size: calc(11px * var(--fs, 1)); color: var(--s400); }

.nwsp-dp-card { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 22px; box-shadow: var(--shadow); }
.nwsp-dp-form { padding: 26px 28px; }
.nwsp-dp-form h2 { font-size: calc(16px * var(--fs, 1)); font-weight: 900; display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.nwsp-dp-form h2::before { content: ''; width: 10px; height: 24px; border-radius: 999px; background: var(--b600); }
.nwsp-dp-formgrid { display: grid; gap: 18px 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .nwsp-dp-formgrid { grid-template-columns: minmax(0, 1fr); } }
.nwsp-dp-f--wide { grid-column: 1 / -1; }
.nwsp-dp-f label { display: block; font-size: calc(12px * var(--fs, 1)); font-weight: 800; color: var(--s700); margin-bottom: 7px; } .nwsp-dp-f label small { font-weight: 500; color: var(--s400); }
.nwsp-dp-f input[type=text], .nwsp-dp-f input[type=number], .nwsp-dp-f select { width: 100%; max-width: none; border: 1px solid var(--s200); border-radius: 14px; padding: 11px 14px; font-size: calc(13px * var(--fs, 1)); background: var(--surface, #fff); color: var(--s900); box-shadow: none; min-height: 0; }
.nwsp-dp-f input:focus, .nwsp-dp-f select:focus { border-color: var(--b600); outline: none; box-shadow: 0 0 0 3px rgba(5, 150, 105, .12); }
.nwsp-dp-f select { appearance: none; -webkit-appearance: none; padding-inline-end: 38px; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: left 14px center; background-size: 16px; cursor: pointer; }
.nwsp-dp-check { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--s200); border-radius: 14px; padding: 12px 16px; cursor: pointer; }
.nwsp-dp-check:hover { border-color: var(--b200); background: var(--b50); }
.nwsp-dp-check span { display: flex; flex-direction: column; font-size: calc(13px * var(--fs, 1)); } .nwsp-dp-check small { color: var(--s400); font-size: calc(11px * var(--fs, 1)); margin-top: 2px; }
.nwsp-dp-agents { display: flex; gap: 10px; flex-wrap: wrap; }
.nwsp-dp-agentchk { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--s200); border-radius: 999px; padding: 5px 14px 5px 6px; font-size: calc(12px * var(--fs, 1)); font-weight: 600; cursor: pointer; margin: 0 !important; }
.nwsp-dp-agentchk .nwsp-dp-av { margin-inline-end: 0; }
.nwsp-dp-agentchk:has(input:checked) { background: var(--b50); border-color: var(--b200); }
.nwsp-dp-formfoot { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: flex-start; padding-top: 6px; }

.nwsp-dp-tablecard { overflow: hidden; }
.nwsp-dp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--s100); }
.nwsp-dp-toolbar__r, .nwsp-dp-toolbar__l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nwsp-dp-sel { border: 1px solid var(--s200); border-radius: 14px; padding: 9px 14px; padding-inline-end: 38px; font-size: calc(12px * var(--fs, 1)); background-color: var(--surface, #fff); background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: left 12px center; background-size: 15px; appearance: none; -webkit-appearance: none; min-width: 150px; max-width: none; cursor: pointer; color: var(--s700); }
.nwsp-dp-count { font-size: calc(12px * var(--fs, 1)); color: var(--s400); padding-inline-start: 12px; border-inline-start: 1px solid var(--s200); }
.nwsp-dp-search { position: relative; }
.nwsp-dp-search svg { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--s400); }
.nwsp-dp-search input { border: 1px solid var(--s200); border-radius: 14px; padding: 10px 14px; padding-inline-start: 38px; font-size: calc(12px * var(--fs, 1)); min-width: 280px; background: var(--surface, #fff); box-shadow: none; max-width: none; }
.nwsp-dp-search input:focus { border-color: var(--b600); outline: none; box-shadow: 0 0 0 3px rgba(5, 150, 105, .12); }
.nwsp-dp-tablewrap { overflow-x: auto; }
.nwsp-dp-table { width: 100%; border-collapse: collapse; text-align: start; font-size: calc(13px * var(--fs, 1)); }
.nwsp-dp-table th { background: var(--s50); color: var(--s700); font-weight: 800; font-size: calc(12px * var(--fs, 1)); padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--s200); white-space: nowrap; }
.nwsp-dp-table td { padding: 18px 16px; border-bottom: 1px solid var(--s100); vertical-align: middle; }
.nwsp-dp-table tbody tr { transition: background .12s; background: var(--surface, #fff); }
.nwsp-dp-table tbody tr:hover { background: var(--s50); }
.nwsp-dp-table tbody tr.is-dragging { opacity: .45; background: var(--b50); }
.nwsp-dp-table tr[hidden] { display: none; }
.nwsp-dp-table .c-chk { width: 44px; } .nwsp-dp-table .c-id { width: 96px; white-space: nowrap; } .nwsp-dp-table .c-act { width: 190px; }
.nwsp-dp-empty { text-align: center; color: var(--s400); padding: 40px !important; }
.nwsp-dp-drag { cursor: grab; color: var(--s300); margin-inline-end: 8px; display: inline-flex; vertical-align: middle; } .nwsp-dp-table tr:hover .nwsp-dp-drag { color: var(--s500); }
.nwsp-dp-idbadge { display: inline-flex; min-width: 36px; height: 30px; align-items: center; justify-content: center; border: 1px solid var(--s200); border-radius: 10px; background: var(--s50); font-weight: 800; font-size: calc(12px * var(--fs, 1)); }
.nwsp-dp-name { display: flex; align-items: flex-start; gap: 14px; }
.nwsp-dp-ico { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nwsp-dp-name__t { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .nwsp-dp-name__t strong { font-size: calc(14px * var(--fs, 1)); font-weight: 900; }
.nwsp-dp-tag { background: var(--b50); border: 1px solid var(--b200); color: var(--b800); font-size: calc(10px * var(--fs, 1)); font-weight: 800; padding: 1px 9px; border-radius: 8px; }
.nwsp-dp-desc { display: block; font-size: calc(12px * var(--fs, 1)); line-height: 1.9; color: var(--s400); max-width: 300px; margin-top: 3px; }
.nwsp-dp-team { display: flex; align-items: center; gap: 12px; }
.nwsp-dp-avs { display: inline-flex; }
.nwsp-dp-av { width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: calc(11px * var(--fs, 1)); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; margin-inline-end: -10px; position: relative; direction: ltr; flex-shrink: 0; }
.nwsp-dp-av--more { background: var(--s200) !important; color: var(--s600); }
.nwsp-dp-team__t { display: flex; flex-direction: column; font-size: calc(12px * var(--fs, 1)); margin-inline-start: 12px; } .nwsp-dp-team__t b { font-weight: 800; } .nwsp-dp-team__t b.is-none { color: var(--rose-600); } .nwsp-dp-team__t small { color: var(--s400); font-size: calc(11px * var(--fs, 1)); }
.nwsp-dp-req { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.nwsp-dp-req span { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--s200); background: var(--s50); color: var(--s600); border-radius: 999px; padding: 4px 14px; font-size: calc(12px * var(--fs, 1)); font-weight: 800; }
.nwsp-dp-req.is-yes span { background: var(--b50); border-color: var(--b200); color: var(--b800); }
.nwsp-dp-req small { color: var(--s400); font-size: calc(11px * var(--fs, 1)); }
.nwsp-dp-inline { margin: 0; }
.nwsp-dp-switch { position: relative; width: 56px; height: 30px; border-radius: 999px; border: 0; background: var(--s300); cursor: pointer; padding: 0; transition: background .2s; direction: ltr; }
.nwsp-dp-switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface, #fff); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .2s; }
.nwsp-dp-switch.is-on { background: var(--b600); } .nwsp-dp-switch.is-on i { left: 29px; }
.nwsp-dp-actions { display: flex; align-items: center; gap: 12px; }
.nwsp-dp-more { position: relative; } .nwsp-dp-more summary { list-style: none; cursor: pointer; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--s500); } .nwsp-dp-more summary::-webkit-details-marker { display: none; } .nwsp-dp-more summary:hover { background: var(--s100); }
.nwsp-dp-menu { position: absolute; inset-inline-end: 0; top: 100%; z-index: 30; min-width: 170px; background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 14px; box-shadow: 0 14px 34px rgba(15, 23, 42, .15); padding: 6px; }
.nwsp-dp-menu button { display: flex; gap: 8px; align-items: center; width: 100%; border: 0; background: none; padding: 9px 12px; border-radius: 10px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; cursor: pointer; text-align: start; font-family: inherit; }
.nwsp-dp-menu button:hover { background: var(--s100); } .nwsp-dp-menu button.is-danger { color: var(--rose-700); } .nwsp-dp-menu button.is-danger:hover { background: var(--rose-50); }
.nwsp-dp-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 22px; font-size: calc(12px * var(--fs, 1)); color: var(--s500); }
.nwsp-dp-pager nav { display: flex; gap: 6px; }
.nwsp-dp-pager nav a { min-width: 36px; height: 34px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--s200); border-radius: 10px; text-decoration: none; color: var(--s700); font-weight: 700; background: var(--surface, #fff); }
.nwsp-dp-pager nav a.is-on { background: var(--b600); border-color: var(--b600); color: #fff; } .nwsp-dp-pager nav a.is-off { opacity: .45; pointer-events: none; }
.nwsp-dp-note { display: flex; gap: 16px; align-items: flex-start; background: var(--b50); border: 1px solid var(--b200); border-radius: 20px; padding: 22px 26px; }
.nwsp-dp-note__ico { width: 46px; height: 46px; border-radius: 14px; background: var(--b600); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nwsp-dp-note strong { font-size: calc(14px * var(--fs, 1)); font-weight: 900; display: block; } .nwsp-dp-note p { margin: 8px 0 0; font-size: calc(12.5px * var(--fs, 1)); line-height: 2.1; color: var(--s600); }
.nwsp-dp-bar { position: static; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border: 1px solid var(--s200); border-radius: 20px; padding: 14px 22px; box-shadow: 0 14px 40px rgba(15, 23, 42, .12); }
.nwsp-dp-bar__r { display: inline-flex; align-items: center; gap: 10px; font-size: calc(12px * var(--fs, 1)); color: var(--s500); } .nwsp-dp-bar__r i { width: 9px; height: 9px; border-radius: 50%; background: var(--b500); }
.nwsp-dp-bar__l { display: inline-flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .nwsp-dp-head, .nwsp-dp-form { padding: 18px; } .nwsp-dp-search input { min-width: 0; width: 100%; } .nwsp-dp-bar { position: static; } }

/* Row-selection and form checkboxes stay real checkboxes here (the status column is the only switch). */
.nwsp-apage .nwsp-dp input[type="checkbox"] { appearance: auto; -webkit-appearance: checkbox; width: 18px; height: 18px; min-width: 18px; border-radius: 5px; background: initial; accent-color: var(--b600); border: 1px solid var(--s300); position: static; }
.nwsp-apage .nwsp-dp input[type="checkbox"]::after, .nwsp-apage .nwsp-dp input[type="checkbox"]::before { display: none !important; content: none !important; }
.nwsp-apage .nwsp-dp input[type="checkbox"]:checked { background: initial; }
.nwsp-apage .nwsp-dp .nwsp-dp-check, .nwsp-apage .nwsp-dp .nwsp-dp-agentchk { display: flex !important; }
.nwsp-apage .nwsp-dp .nwsp-dp-agentchk { display: inline-flex !important; }
.nwsp-apage .nwsp-dp .nwsp-dp-f label { display: block !important; font-weight: 800 !important; margin-bottom: 7px !important; }
.nwsp-apage .nwsp-dp label.nwsp-dp-check, .nwsp-apage .nwsp-dp label.nwsp-dp-agentchk { margin-bottom: 0 !important; font-weight: 600 !important; }

/* ===== Payments page ===== */
.nwsp-pay-code{display:inline-flex;align-items:center;gap:8px;font-weight:800;font-size: calc(13px * var(--fs, 1));color:var(--s800,#1e293b)}
.nwsp-pay-copy{border:1px solid var(--s200,#e2e8f0);background: var(--surface, #fff);border-radius:8px;padding:5px;cursor:pointer;color:var(--s500,#64748b);display:inline-flex}
.nwsp-pay-copy:hover,.nwsp-pay-copy.is-done{color:var(--b600,var(--b600, #059669));border-color:var(--b600,var(--b600, #059669))}
.nwsp-pay-title{display:flex;flex-direction:column;gap:5px}
.nwsp-pay-title small{color:var(--s500,#64748b);font-size: calc(12px * var(--fs, 1))}
.nwsp-pay-chips{display:flex;gap:6px;flex-wrap:wrap}
.nwsp-pay-chip{display:inline-flex;align-items:center;gap:4px;font-size: calc(11px * var(--fs, 1));font-weight:700;padding:2px 9px;border-radius:999px;background:#f1f5f9;color:#475569;text-decoration:none}
.nwsp-pay-chip--ticket{background:var(--b50, #ecfdf5);color:var(--b700, #047857)}
.nwsp-pay-date{display:flex;flex-direction:column;gap:3px}
.nwsp-pay-date small{color:var(--s500,#64748b);font-size: calc(12px * var(--fs, 1))}
.nwsp-pay-amount{display:flex;align-items:baseline;gap:5px}
.nwsp-pay-amount b{font-size: calc(16px * var(--fs, 1));font-weight:900}
.nwsp-pay-amount span,.nwsp-pay-table td small{color:var(--s500,#64748b);font-size: calc(12px * var(--fs, 1))}
.nwsp-pay-status{display:inline-flex;align-items:center;gap:6px;font-size: calc(12px * var(--fs, 1));font-weight:800;padding:5px 12px;border-radius:999px;background:var(--b50, #ecfdf5);color:var(--b700, #047857)}
.nwsp-pay-status i{width:7px;height:7px;border-radius:50%;background:currentColor}
.nwsp-pay-status--pending{background:#fffbeb;color:#b45309}
.nwsp-pay-status--failed{background:#fef2f2;color:#b91c1c}
.nwsp-pay-status--refunded{background:#f1f5f9;color:#475569}
.nwsp-pay-note{margin:0;font-size: calc(12.5px * var(--fs, 1));color:var(--s600,#475569);max-width:240px}
.nwsp-pay-up{color:var(--b700, #047857)!important}.nwsp-pay-down{color:#b91c1c!important}
.nwsp-dp-pager nav a.is-off{opacity:.4;pointer-events:none}
.nwsp-dp-gap{padding:0 4px;color:#94a3b8}

/* ===== FAQ page ===== */
.nwsp-kbp-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:20px;align-items:start}
.nwsp-kbp-main{display:flex;flex-direction:column;gap:14px;min-width:0}
.nwsp-kbp-tool{display:flex;gap:10px;flex-wrap:wrap;align-items:center;padding:14px}
.nwsp-kbp-tool .nwsp-dp-search{flex:1;min-width:200px}
.nwsp-kbp-item{padding:0;overflow:hidden}
.nwsp-kbp-item[open]{border-color:var(--b600,var(--b600, #059669));box-shadow:0 0 0 2px rgba(5,150,105,.12)}
.nwsp-kbp-item summary{list-style:none;display:flex;align-items:center;gap:14px;padding:16px 18px;cursor:pointer}
.nwsp-kbp-item summary::-webkit-details-marker{display:none}
.nwsp-kbp-chev{display:inline-flex;padding:8px;border-radius:10px;background:#f1f5f9;color:#64748b;transition:transform .2s}
.nwsp-kbp-item[open] .nwsp-kbp-chev{transform:rotate(180deg);background:var(--b50, #ecfdf5);color:var(--b600, #059669)}
.nwsp-kbp-sum{flex:1;min-width:0}
.nwsp-kbp-sum h3{margin:6px 0 0;font-size: calc(15px * var(--fs, 1));font-weight:800}
.nwsp-kbp-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size: calc(12px * var(--fs, 1));color:#64748b}
.nwsp-kbp-views{display:inline-flex;align-items:center;gap:4px}
.nwsp-kbp-form{display:inline-flex;align-items:center;gap:4px;color:var(--b700, #047857);font-weight:700}
.nwsp-kbp-body{padding:4px 22px 16px;border-top:1px solid #eef2f6;line-height:2;color:#475569;font-size: calc(14px * var(--fs, 1))}
.nwsp-kbp-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:0 22px 14px;font-size: calc(12px * var(--fs, 1));color:#64748b}
.nwsp-kbp-acts{display:flex;gap:6px}
.nwsp-kbp-pager{display:flex;align-items:center;gap:16px;padding:14px 18px;flex-wrap:wrap}
.nwsp-kbp-pager .nwsp-dp-pager{margin-inline-start:auto;border:0;padding:0}
.nwsp-kbp-bulkdel{background:none;border:0;color:#dc2626;font-weight:700;cursor:pointer}
.nwsp-kbp-side{position:sticky;top:44px}
.nwsp-kbp-sidehead{display:flex;gap:12px;align-items:center;margin-bottom:14px}
.nwsp-kbp-sidehead h2{margin:0;font-size: calc(16px * var(--fs, 1))}.nwsp-kbp-sidehead small{color:#64748b}
.nwsp-kbp-side .nwsp-dp-f select,.nwsp-kbp-side .nwsp-dp-f input[type=text]{width:100%}
.nwsp-kbp-opts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}
.nwsp-kbp-opt{display:flex;justify-content:space-between;align-items:center;gap:8px;border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px}
.nwsp-kbp-opt span{display:flex;flex-direction:column;font-size: calc(12px * var(--fs, 1))}.nwsp-kbp-opt small{color:#64748b}
.nwsp-kbp-opt input[type=number]{width:64px}
@media(max-width:1100px){.nwsp-kbp-grid{grid-template-columns:1fr}.nwsp-kbp-side{position:static}}

/* ===== Payment links ===== */
.nwsp-lnk-tabs{display:flex;gap:6px;flex-wrap:wrap;padding:14px 16px 0}
.nwsp-lnk-tabs a{display:inline-flex;gap:6px;align-items:center;padding:8px 14px;border-radius:10px;color:#475569;text-decoration:none;font-weight:700;font-size: calc(13px * var(--fs, 1))}
.nwsp-lnk-tabs a span{background:#f1f5f9;border-radius:999px;padding:0 8px;font-size: calc(11px * var(--fs, 1))}
.nwsp-lnk-tabs a.is-on{background:var(--b50, #ecfdf5);color:var(--b700, #047857)}.nwsp-lnk-tabs a.is-on span{background:var(--b600, #059669);color:#fff}
.nwsp-lnk-gw{display:block;margin-top:4px;color:#64748b}
.nwsp-lnk-status--published{background:var(--b50, #ecfdf5);color:var(--b700, #047857)}.nwsp-lnk-status--draft{background:#f1f5f9;color:#475569}
.nwsp-lnk-status--paid{background:#eff6ff;color:#1d4ed8}.nwsp-lnk-status--expired{background:#fef2f2;color:#b91c1c}
.nwsp-lnk-acts{display:flex;gap:12px;flex-wrap:wrap}
.nwsp-lnk-acts a,.nwsp-lnk-acts button{display:inline-flex;align-items:center;gap:4px;background:none;border:0;padding:0;cursor:pointer;font-size: calc(12px * var(--fs, 1));font-weight:700;color:#2563eb;text-decoration:none}
.nwsp-lnk-acts .is-danger{color:#dc2626}
.nwsp-lnk-sections{display:flex;flex-direction:column;gap:16px;width:100%}
.nwsp-lnk-h{margin:0 0 14px;font-size: calc(15px * var(--fs, 1));border-inline-start:4px solid var(--b600, #059669);padding-inline-start:10px}
.nwsp-lnk-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.nwsp-lnk-three{display:grid;grid-template-columns:1.2fr .6fr 1.6fr;gap:14px}
.nwsp-lnk-form .nwsp-dp-f input,.nwsp-lnk-form .nwsp-dp-f select,.nwsp-lnk-form .nwsp-dp-f textarea{width:100%}
.nwsp-lnk-form .nwsp-dp-f small,.nwsp-lnk-hint{color:#64748b;font-size: calc(12px * var(--fs, 1));display:block;margin-top:4px}
@media(max-width:800px){.nwsp-lnk-two,.nwsp-lnk-three{grid-template-columns:1fr}}

/* ===== Canned replies ===== */
.nwsp-cnd-formgrid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
.nwsp-cnd .nwsp-dp-f input[type=text],.nwsp-cnd .nwsp-dp-f select,.nwsp-cnd .nwsp-dp-f textarea{width:100%}
.nwsp-cnd .nwsp-dp-f small{color:#64748b;font-weight:500;font-size: calc(12px * var(--fs, 1))}
.nwsp-cnd-key{background:#f1f5f9;border-radius:8px;padding:3px 9px;font-size: calc(12px * var(--fs, 1))}
.nwsp-cnd-use{display:inline-flex;flex-direction:column;align-items:center;background:#f1f5f9;border-radius:12px;padding:6px 12px;font-weight:800}
.nwsp-cnd-use small{font-size: calc(11px * var(--fs, 1));color:#64748b;font-weight:600}
.nwsp-cnd-topt{font-size: calc(16px * var(--fs, 1))!important}
.nwsp-cnd-switch{width:42px;height:24px;border-radius:999px;border:0;background:#cbd5e1;position:relative;cursor:pointer;padding:0;transition:background .2s}
.nwsp-cnd-switch i{position:absolute;top:3px;inset-inline-start:3px;width:18px;height:18px;border-radius:50%;background: var(--surface, #fff);transition:inset-inline-start .2s}
.nwsp-cnd-switch.is-on{background:var(--b600, #059669)}.nwsp-cnd-switch.is-on i{inset-inline-start:21px}
.nwsp-cnd-acts{white-space:nowrap}
.nwsp-cnd-edit,.nwsp-cnd-del{display:inline-block;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;border-radius:8px;padding:5px 12px;font-size: calc(12px * var(--fs, 1));font-weight:700;text-decoration:none;cursor:pointer;margin-inline-start:6px}
.nwsp-cnd-del{border-color:#fecaca;background:#fef2f2;color:#dc2626}
@media(max-width:800px){.nwsp-cnd-formgrid{grid-template-columns:1fr}}

/* ===== SMS settings ===== */
.nwsp-sms-sec{margin-bottom:16px}
.nwsp-sms-sech{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid #eef2f6;padding-bottom:12px;margin-bottom:6px}
.nwsp-sms-sech h2{margin:0;font-size: calc(15px * var(--fs, 1));display:flex;gap:8px;align-items:center}.nwsp-sms-sech small{color:#94a3b8}
.nwsp-sms-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 0}
.nwsp-sms-row b{display:block;font-size: calc(14px * var(--fs, 1))}.nwsp-sms-row small{display:block;color:#64748b;margin-top:4px;line-height:1.8;font-size: calc(12.5px * var(--fs, 1))}
.nwsp-sms-ctl{display:flex;align-items:center;gap:12px;flex-shrink:0}
.nwsp-sms-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin:6px 0 10px}
.nwsp-sms .nwsp-dp-f input[type=text],.nwsp-sms .nwsp-dp-f input[type=password],.nwsp-sms .nwsp-dp-f input[type=number],.nwsp-sms .nwsp-dp-f select{width:100%}
.nwsp-sms .nwsp-dp-f small{color:#64748b;font-weight:500;font-size: calc(12px * var(--fs, 1));display:block;margin-top:4px}
.nwsp-sms-ev{border-top:1px solid #eef2f6}
.nwsp-sms-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:14px;margin-bottom:14px}
.nwsp-sms-vars{display:flex;gap:6px;flex-wrap:wrap;align-items:center;font-size: calc(12px * var(--fs, 1));color:#64748b;margin-top:8px}
.nwsp-sms-vars code,.nwsp-sms-tip code{background: var(--surface, #fff);border:1px solid #e2e8f0;border-radius:8px;padding:2px 8px}
.nwsp-sms-tip{color:#64748b;font-size: calc(12.5px * var(--fs, 1));margin:0}
.nwsp-sms-bal{background:var(--b50, #ecfdf5);border-radius:12px;padding:8px 14px;display:flex;flex-direction:column}
.nwsp-sms-bal small{color:var(--b700, #047857);font-size: calc(11px * var(--fs, 1))}.nwsp-sms-bal b{font-size: calc(16px * var(--fs, 1))}.nwsp-sms-bal span{font-size: calc(11px * var(--fs, 1));font-weight:600}
.nwsp-sms-sw{position:relative;display:inline-block;width:46px;height:26px;flex-shrink:0;cursor:pointer}
.nwsp-apage .nwsp-dp .nwsp-sms-sw input[type=checkbox]{position:absolute;opacity:0;width:100%;height:100%;min-width:0;margin:0;cursor:pointer;z-index:1}
.nwsp-sms-sw i{position:absolute;inset:0;border-radius:999px;background:#cbd5e1;transition:background .2s}
.nwsp-sms-sw i::after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:20px;height:20px;border-radius:50%;background: var(--surface, #fff);transition:inset-inline-start .2s}
.nwsp-sms-sw input:checked+i{background:var(--b600, #059669)}.nwsp-sms-sw input:checked+i::after{inset-inline-start:23px}

/* create-form selects: keep full text visible */
.nwsp-createform .nwsp-select{line-height:2 !important;height:auto;padding-top:6px;padding-bottom:6px}
.nwsp-formcard > header { flex-wrap: wrap; gap: 12px; }
.nwsp-formcard > header h2 { margin: 0; }
.nwsp-formcard > header .nwsp-btn { margin-inline-start: auto; }
.nwsp-createform .nwsp-formfoot button[type=submit].nwsp-btn--primary { background: linear-gradient(135deg, var(--b500, #10b981) 0%, var(--b600, #059669) 100%) !important; color: #fff !important; border: 1px solid var(--b700, #047857) !important; border-radius: 14px !important; box-shadow: 0 8px 18px rgba(5, 150, 105, .3); font-weight: 800; transition: transform .15s, box-shadow .15s; }
.nwsp-createform .nwsp-formfoot button[type=submit].nwsp-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(5, 150, 105, .38); }
.nwsp-createform .nwsp-formfoot button[type=submit].nwsp-btn--primary[disabled] { opacity: .75; transform: none; cursor: wait; }
.nwsp-createform .nwsp-formfoot .nwsp-btn--ghost { border-radius: 14px; }
/* IRANSans everywhere in the plugin (locally hosted, see assets/fonts) */
.nwsp-root, .nwsp-settings, .nwsp-apage, .nwsp-dp, .nwsp-sms, .nwsp-cnd, .nwsp-lnk-form, .nwsp-kbp-side,
.nwsp-root *, .nwsp-settings *, .nwsp-apage *, .nwsp-dp *, .nwsp-sms *, .nwsp-cnd *,
.nwsp-root input, .nwsp-root select, .nwsp-root textarea, .nwsp-root button,
.nwsp-apage input, .nwsp-apage select, .nwsp-apage textarea, .nwsp-apage button,
.nwsp-dp input, .nwsp-dp select, .nwsp-dp textarea, .nwsp-dp button { font-family: 'IRANSans', Tahoma, sans-serif; }
.nwsp-id, .nwsp-body pre, .nwsp-body code, .nwsp-html, .nwsp-kv .mono, .nwsp-voice__timer, .nwsp-msg__time { font-family: ui-monospace, Menlo, Consolas, monospace !important; }
.nwsp-voice [data-a="toggle"] { background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%); border: 1px solid #fda4af; color: #be123c; border-radius: 14px; padding: 12px 18px; font-weight: 800; gap: 10px; box-shadow: 0 6px 14px rgba(225, 29, 72, .12); transition: transform .15s, box-shadow .15s, background .15s; }
.nwsp-voice [data-a="toggle"]:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(225, 29, 72, .2); }
.nwsp-voice [data-a="toggle"] .nwsp-rec-dot { width: 12px; height: 12px; background: #e11d48; box-shadow: 0 0 0 4px rgba(225, 29, 72, .18); }
.nwsp-voice.is-rec [data-a="toggle"] { background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%); border-color: #9f1239; color: #fff; }
.nwsp-root .nwsp-voice.is-rec button[data-a="toggle"], .nwsp-root .nwsp-voice.is-rec button[data-a="toggle"] .lbl { color: #fff !important; }
.nwsp-voice.is-rec [data-a="toggle"] .nwsp-rec-dot { background: var(--surface, #fff); box-shadow: 0 0 0 4px rgba(255, 255, 255, .3); }
.nwsp-voice [data-a="del"] { border-radius: 14px; }
.nwsp-editor__area:empty::before { direction: rtl; unicode-bidi: plaintext; text-align: right; width: 100%; }
body .nwsp-root .nwsp-editor__area:empty::before, body.wp-admin .nwsp-editor__area:empty::before { direction: rtl !important; text-align: right !important; unicode-bidi: plaintext !important; display: block; width: 100%; }
body .nwsp-root .nwsp-editor__area:empty { text-align: right; }
/* Conversation: customer vs support messages are visually distinct */
.nwsp-msgs { display: flex; flex-direction: column; }
.nwsp-msgs > .nwsp-msg:not(.nwsp-msg--system):not(.nwsp-msg--note) { max-width: 88%; }
.nwsp-msg--customer { align-self: flex-start; background: #f0f9ff; border-color: #bae6fd; border-inline-start: 4px solid #0ea5e9; }
.nwsp-msg--customer .nwsp-msg__head { border-color: #e0f2fe; }
.nwsp-msg--customer .nwsp-msg__who img { box-shadow: 0 0 0 2px #7dd3fc; }
.nwsp-msg--agent { align-self: flex-end; border-inline-start: 4px solid var(--b600); }
.nwsp-msg--agent .nwsp-msg__who img { box-shadow: 0 0 0 2px var(--b400); }
.nwsp-msg--note, .nwsp-msg--ai, .nwsp-msg--system { align-self: stretch; }
.nwsp-msgs > * + * { margin-top: 14px; }
.nwsp-role { display: inline-flex; align-items: center; gap: 4px; font-size: calc(10px * var(--fs, 1)); font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.nwsp-role svg { width: 12px; height: 12px; }
.nwsp-role--customer { background: #e0f2fe; color: #0369a1; }
.nwsp-role--agent { background: var(--b100); color: var(--b800); }
@media (max-width: 640px) { .nwsp-msgs > .nwsp-msg:not(.nwsp-msg--system):not(.nwsp-msg--note) { max-width: 100%; } }
.nwsp-msgs > .nwsp-msg:not(.nwsp-msg--system):not(.nwsp-msg--note) { max-width: none; }
.nwsp-msg--customer, .nwsp-msg--agent { align-self: stretch; }
.nwsp-prevt { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nwsp-prevt a { display: block; padding: 9px 12px; border: 1px solid var(--s100); border-radius: 12px; background: var(--s50); text-decoration: none; color: var(--s800); transition: border-color .15s, background .15s; }
.nwsp-prevt a:hover { border-color: var(--b400); background: var(--b50); }
.nwsp-prevt__s { display: block; font-weight: 800; font-size: calc(12px * var(--fs, 1)); margin-bottom: 4px; }
.nwsp-prevt__m { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: calc(11px * var(--fs, 1)); color: var(--s500); }
.nwsp-panel textarea[data-qnote] { width: 100%; resize: vertical; }
@media (min-width: 1024px) { .nwsp-cols { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); } }
/* Ticket side panel: status / priority / department / agent controls */
.nwsp-side .nwsp-panel .nwsp-field { margin: 0; padding: 10px 0; border-bottom: 1px dashed var(--s200); }
.nwsp-side .nwsp-panel .nwsp-field > label { display: block; font-size: calc(11px * var(--fs, 1)); font-weight: 800; color: var(--s500); margin-bottom: 6px; }
.nwsp-side .nwsp-panel select.nwsp-select { width: 100%; min-height: 42px; background-color: var(--s50); border: 1px solid var(--s200); border-radius: 12px; padding: 8px 12px; padding-inline-end: 36px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s800); box-shadow: none; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.nwsp-side .nwsp-panel select.nwsp-select:hover { border-color: var(--b400); background-color: var(--surface, #fff); }
.nwsp-side .nwsp-panel select.nwsp-select:focus { border-color: var(--b600); background-color: var(--surface, #fff); box-shadow: 0 0 0 3px rgba(5, 150, 105, .14); outline: none; }
.nwsp-side .nwsp-panel .nwsp-kv { margin-top: 10px; padding: 9px 12px; background: var(--s50); border-radius: 12px; }
/* Ticket list toolbar: search must not overlap the filters */
.nwsp-toolbar__group > * { flex-shrink: 0; }
.nwsp-toolbar__group > .nwsp-search { flex: 1 1 220px; min-width: 0; max-width: 420px; flex-shrink: 1; }
.nwsp-toolbar .nwsp-search input { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.nwsp-toolbar__group > .nwsp-select { flex: 0 1 auto; min-width: 140px; width: auto; }
/* ===== Customer ticket list (design: header, KPI tiles, toolbar, ticket cards) ===== */
.nwsp-cl { display: flex; flex-direction: column; gap: 10px; }
.nwsp-cl > [data-slot=msgr]:empty { display: none; }
.nwsp-cl.nwsp-stack > * + * { margin-top: 0; }
.nwsp-cl-top { border-radius: 20px; padding: 16px 20px; margin-bottom: 0; }
.nwsp-logo--live { position: relative; width: 48px; height: 48px; border-radius: 16px; box-shadow: 0 8px 18px rgba(5, 150, 105, .3); }
.nwsp-logo--live::after { content: ''; position: absolute; top: -3px; inset-inline-start: -3px; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.nwsp-cl-top .nwsp-brand h2 { font-size: calc(17px * var(--fs, 1)); font-weight: 900; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nwsp-cl-ai { font-size: calc(10px * var(--fs, 1)); font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--b50); color: var(--b700); border: 1px solid var(--b200); }
.nwsp-cl-btn { border-radius: 14px !important; padding: 11px 20px !important; font-weight: 800; border: 0 !important; gap: 8px; }
.nwsp-cl-btn--dark { background: #0f172a !important; color: #fff !important; box-shadow: 0 8px 18px rgba(15, 23, 42, .25); }
.nwsp-cl-btn--green { background: linear-gradient(135deg, var(--b500, #10b981), var(--b600, #059669)) !important; color: #fff !important; box-shadow: 0 8px 18px rgba(5, 150, 105, .3); }
.nwsp-cl-btn:hover { transform: translateY(-1px); }
.nwsp-cl-kpis { gap: 14px; margin-bottom: 0; }
.nwsp-cl-kpis .nwsp-kpi { border-radius: 18px; padding: 16px 18px; gap: 18px; }
.nwsp-cl-kpis .nwsp-kpi__head { flex-direction: row; }
.nwsp-cl-kpis .nwsp-kpi__icon { width: 38px; height: 38px; border-radius: 12px; }
.nwsp-cl-kpis .nwsp-kpi__hint { font-size: calc(10px * var(--fs, 1)); padding: 3px 10px; border-radius: 999px; }
.nwsp-cl-kpis .nwsp-kpi__foot { align-items: flex-end; }
.nwsp-kpi__label { font-size: calc(13px * var(--fs, 1)); font-weight: 800; color: var(--s800); }
.nwsp-cl-kpis .nwsp-kpi__n { font-size: calc(26px * var(--fs, 1)); }
.nwsp-cl-kpis .nwsp-kpi.is-active { background: var(--surface, #fff); box-shadow: 0 10px 24px rgba(5, 150, 105, .14); }
.nwsp-cl-tools { border-radius: 18px; padding: 12px 14px; margin-bottom: 0; flex-wrap: nowrap; }
.nwsp-cl-tools .nwsp-toolbar__group { flex-wrap: nowrap; }
.nwsp-cl-tools .nwsp-search input { border-radius: 14px; background: var(--s50); }
.nwsp-cl-tools select.nwsp-select { border-radius: 14px; min-width: 150px; }
@media (max-width: 900px) { .nwsp-cl-tools, .nwsp-cl-tools .nwsp-toolbar__group { flex-wrap: wrap; } }
.nwsp-viewtog { display: inline-flex; background: var(--s100); border-radius: 12px; padding: 3px; gap: 2px; }
.nwsp-viewtog button { border: 0; background: transparent; width: 34px; height: 32px; border-radius: 9px; cursor: pointer; color: var(--s500); display: inline-flex; align-items: center; justify-content: center; }
.nwsp-viewtog button.is-on { background: var(--surface, #fff); color: var(--b700); box-shadow: 0 2px 6px rgba(15, 23, 42, .1); }
.nwsp-viewtog svg { width: 16px; height: 16px; }
.nwsp-cl-list--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nwsp-cl-list--grid > .nwsp-ticket { margin: 0; }
.nwsp-cl-list--grid .nwsp-tk__last { white-space: normal; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; }
@media (max-width: 800px) { .nwsp-cl-list--grid { grid-template-columns: 1fr; } }
.nwsp-tk { border-radius: 18px; padding: 18px 20px; align-items: center; position: relative; }
.nwsp-tk:hover { border-color: var(--b400); box-shadow: 0 10px 26px rgba(15, 23, 42, .07); }
.nwsp-tk.is-closed { background: var(--s50); opacity: .92; }
.nwsp-tk__main { display: flex; gap: 14px; flex: 1; min-width: 260px; align-items: flex-start; }
.nwsp-tk__hash { width: 34px; height: 34px; border-radius: 10px; background: var(--s100); color: var(--s500); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.nwsp-tk__body { min-width: 0; flex: 1; }
.nwsp-tk__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nwsp-tk__title h3 { font-size: calc(14px * var(--fs, 1)); font-weight: 900; margin: 0; color: var(--s900); }
.nwsp-tk__id { font-size: calc(10px * var(--fs, 1)); font-weight: 800; padding: 2px 9px; border-radius: 8px; background: var(--s100); color: var(--s600); border: 1px solid var(--s200); direction: ltr; }
.nwsp-tk__last { font-size: calc(12px * var(--fs, 1)); color: var(--s500); margin: 6px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 760px; }
.nwsp-tk__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: calc(11px * var(--fs, 1)); color: var(--s500); }
.nwsp-tk__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.nwsp-tk__meta svg { width: 13px; height: 13px; color: var(--s400); }
.nwsp-tk__dept { background: var(--b50); color: var(--b700); padding: 3px 10px; border-radius: 8px; font-weight: 800; }
.nwsp-tk__dept svg { color: var(--b600); }
.nwsp-tk__by b { color: var(--s800); }
.nwsp-tk__side { display: flex; align-items: center; gap: 10px; }
.nwsp-tk__go { border-radius: 12px; font-weight: 800; }
.nwsp-tk__menuwrap { position: relative; }
.nwsp-tk__dots { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--s200); background: var(--surface, #fff); cursor: pointer; color: var(--s500); display: inline-flex; align-items: center; justify-content: center; }
.nwsp-tk__dots:hover { background: var(--s50); color: var(--s800); }
.nwsp-tk__menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 20; min-width: 150px; background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 12px; box-shadow: 0 12px 28px rgba(15, 23, 42, .14); padding: 6px; display: flex; flex-direction: column; }
.nwsp-tk__menu[hidden] { display: none; }
.nwsp-tk__menu button { border: 0; background: none; text-align: start; padding: 8px 12px; border-radius: 8px; font-size: calc(12px * var(--fs, 1)); cursor: pointer; color: var(--s700); }
.nwsp-tk__menu button:hover { background: var(--b50); color: var(--b800); }
@media (max-width: 640px) { .nwsp-tk__side { width: 100%; justify-content: space-between; } .nwsp-tk__last { white-space: normal; } }
/* Theme button styles (grey background) must not leak into plugin buttons */
.nwsp-root button.nwsp-btn--ghost, .nwsp-root button.nwsp-tk__dots, .nwsp-root button.nwsp-btn--soft:not(:hover) { background-color: var(--surface, #fff) !important; }
.nwsp-root button.nwsp-btn--ghost:hover, .nwsp-root button.nwsp-tk__dots:hover { background-color: var(--s50) !important; }
.nwsp-root button.nwsp-btn--danger { background-color: var(--rose-50) !important; }
.nwsp-root button.nwsp-btn--danger:hover { background-color: var(--rose-100) !important; }
.nwsp-root .nwsp-tk__menu button, .nwsp-root .nwsp-viewtog button:not(.is-on) { background-color: transparent !important; box-shadow: none; }
.nwsp-root .nwsp-tk__menu button:hover { background-color: var(--b50) !important; }

/* ===== Ticket detail (agent) — redesigned thread, reply box and side panels ===== */
.nwsp-threadhead { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 14px; padding: 18px 22px; }
.nwsp-th__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.nwsp-th__row h2 { font-size: calc(17px * var(--fs, 1)); font-weight: 900; margin: 0; color: var(--s900); }
.nwsp-th__back { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--s500); text-decoration: none; }
.nwsp-th__back:hover { background: var(--s100); color: var(--s800); }
.nwsp-th__id { background: var(--b100); color: var(--b800); border-radius: 8px; padding: 3px 10px; font-size: calc(12px * var(--fs, 1)); font-weight: 800; }
.nwsp-pill--dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.nwsp-pill--dot { padding: 4px 12px; border: 1px solid currentColor; background: var(--surface, #fff); }
.nwsp-pill--dot.nwsp-pill--amber { background: var(--amber-50); color: var(--amber-700); border-color: var(--amber-200); }
.nwsp-prio { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; font-size: calc(11px * var(--fs, 1)); font-weight: 800; background: var(--s100); color: var(--s600); border: 1px solid var(--s200); }
.nwsp-prio svg { width: 13px; height: 13px; }
.nwsp-prio--critical { background: var(--rose-50); color: var(--rose-600); border-color: var(--rose-200); }
.nwsp-prio--high { background: var(--amber-50); color: var(--amber-700); border-color: var(--amber-200); }
.nwsp-th__meta { display: inline-flex; align-items: center; gap: 10px; font-size: calc(12px * var(--fs, 1)); color: var(--s500); }
.nwsp-th__meta b { color: var(--s800); }
.nwsp-th__sep { width: 1px; height: 14px; background: var(--s300); }
.nwsp-threadhead__act .nwsp-btn { border-radius: 12px; padding: 9px 16px; background: var(--surface, #fff) !important; }
.nwsp-threadhead__act .nwsp-btn--soft { border: 1px solid var(--b200); color: var(--b700); }
.nwsp-threadhead__act .nwsp-btn--danger { border: 1px solid var(--rose-200); }

/* messages */
.nwsp-msg { padding: 0; overflow: hidden; border-radius: 18px; }
.nwsp-msg__head { padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--s100); }
.nwsp-msg > .nwsp-body { padding: 18px 20px; font-size: calc(14px * var(--fs, 1)); line-height: 2; color: var(--s800); }
.nwsp-msg > .nwsp-atts { margin: 0; padding: 0 20px 18px; border: 0; }
.nwsp-msg--customer, .nwsp-msg--agent { border-inline-start-width: 1px; }
.nwsp-msg--customer { background: var(--surface, #fff); border-color: var(--s200); }
.nwsp-msg--customer .nwsp-msg__head { border-color: var(--s100); }
.nwsp-msg--agent { background: #effcf6; border-color: var(--b200); }
.nwsp-msg--agent .nwsp-msg__head { border-color: var(--b100); background: rgba(209, 250, 229, .35); }
.nwsp-msg__who { gap: 10px; }
.nwsp-msg__name { font-size: calc(13px * var(--fs, 1)); font-weight: 800; color: var(--s900); }
.nwsp-av { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: calc(15px * var(--fs, 1)); background: var(--s100); color: var(--s600); overflow: hidden; flex-shrink: 0; }
.nwsp-av svg { width: 20px; height: 20px; }
.nwsp-av img { width: 100%; height: 100%; border-radius: 0; box-shadow: none !important; object-fit: cover; }
.nwsp-av--agent { background: var(--b600); color: #fff; }
.nwsp-av--note { background: var(--amber-100); color: var(--amber-800); }
.nwsp-av--ai { background: linear-gradient(135deg, #7c3aed 0%, #a855f7 55%, #38bdf8 100%); color: #fff; box-shadow: 0 4px 12px rgba(124,58,237,.35); position: relative; }
.nwsp-av--ai svg { fill: rgba(255,255,255,.25); stroke-width: 1.8; animation: nwsp-ai-twinkle 2.8s ease-in-out infinite; }
@keyframes nwsp-ai-twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.12) rotate(8deg); opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .nwsp-av--ai svg { animation: none; } }
.nwsp-role--customer { background: var(--s100); color: var(--s600); border-radius: 8px; }
.nwsp-role--agent { background: var(--b600); color: #fff; border-radius: 8px; }
.nwsp-msg__time { display: inline-flex; align-items: center; gap: 6px; font-family: inherit !important; font-size: calc(11px * var(--fs, 1)); color: var(--s400); }
.nwsp-msg__time svg { width: 14px; height: 14px; }
.nwsp-msg__time .nwsp-seen { color: var(--b600); margin-inline-start: 4px; }
.nwsp-msg--system { padding: 4px 0; border: 0; background: transparent; box-shadow: none; overflow: visible; }
.nwsp-msg--system > span.nwsp-sysline { display: flex; align-items: center; gap: 14px; background: none; padding: 0; width: 100%; border-radius: 0; }
.nwsp-sysline::before, .nwsp-sysline::after { content: ''; flex: 1; height: 1px; background: var(--s200); }
.nwsp-sysline__t { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--s200); background: var(--surface, #fff); border-radius: 999px; padding: 5px 14px; font-size: calc(11px * var(--fs, 1)); color: var(--s600); }
.nwsp-sysline__t svg { width: 12px; height: 12px; color: var(--b600); }
.nwsp-sysline__d { font-size: calc(10px * var(--fs, 1)); color: var(--s400); }

/* voice player + file chip */
.nwsp-vp { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border-radius: 16px; border: 1px solid var(--b200); background: #f0fdf7; flex-wrap: wrap; }
.nwsp-vp audio { display: none; }
.nwsp-vp__lbl { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s600); padding-inline-end: 14px; border-inline-end: 1px solid var(--b200); order: 5; margin-inline-start: auto; }
.nwsp-vp__lbl svg { width: 15px; height: 15px; color: var(--b600); }
.nwsp-vp__play { order: 1; width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--b600) !important; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 14px rgba(5, 150, 105, .3); flex-shrink: 0; }
.nwsp-vp__play svg { width: 18px; height: 18px; }
.nwsp-vp__cur { order: 2; font-size: calc(11px * var(--fs, 1)); color: var(--s400); min-width: 32px; }
.nwsp-vp__wave { order: 3; flex: 1; min-width: 120px; max-width: 360px; height: 32px; display: flex; align-items: center; gap: 3px; cursor: pointer; }
.nwsp-vp__wave i { flex: 1; border-radius: 2px; background: var(--s300); min-height: 4px; }
.nwsp-vp__wave i.is-on { background: var(--b500); }
.nwsp-vp__dur { order: 4; font-size: calc(11px * var(--fs, 1)); color: var(--s400); min-width: 32px; }
.nwsp-fchip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--s200); background: var(--s50); border-radius: 12px; font-size: calc(12px * var(--fs, 1)); text-decoration: none; color: var(--s800); }
.nwsp-fchip:hover { border-color: var(--b400); background: var(--surface, #fff); }
.nwsp-fchip__ico { color: var(--b600); display: inline-flex; } .nwsp-fchip__ico svg { width: 18px; height: 18px; }
.nwsp-fchip .n { font-weight: 700; } .nwsp-fchip small { color: var(--s400); }
.nwsp-fchip__go { color: var(--b700); font-weight: 800; padding-inline-start: 12px; border-inline-start: 1px solid var(--s200); }

/* reply box */
.nwsp-reply { padding: 0; overflow: hidden; border-radius: 18px; }
.nwsp-reply > * + * { margin-top: 0; }
.nwsp-reply__tabs { gap: 0; padding: 0 14px; border-bottom: 1px solid var(--s100); }
.nwsp-reply__tabs[hidden] { display: none; }
.nwsp-reply__tabs button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent !important; padding: 14px 16px; font-size: calc(12px * var(--fs, 1)); color: var(--s500); }
.nwsp-reply__tabs button svg { width: 15px; height: 15px; }
.nwsp-reply__tabs button.is-active { color: var(--b700); border-bottom-color: var(--b600); }
.nwsp-reply__tabs button.is-active.note { color: var(--amber-800); border-bottom-color: var(--amber-600); }
.nwsp-reply .nwsp-editor { border: 0; border-radius: 0; }
.nwsp-reply .nwsp-editor:focus-within { box-shadow: none; }
.nwsp-reply .nwsp-editor__bar { background: var(--surface, #fff); padding: 10px 14px; }
.nwsp-reply .nwsp-editor__area { min-height: 130px; }
.nwsp-reply .nwsp-canned { margin-inline-start: auto; width: auto; min-height: 32px; border-radius: 10px; border: 1px solid var(--b200); background-color: var(--b50); color: var(--b700); font-size: calc(11px * var(--fs, 1)); font-weight: 800; padding: 4px 12px; }
.nwsp-reply .nwsp-canned[hidden] { display: none; }
.nwsp-reply .nwsp-chips, .nwsp-reply [data-voice] { padding: 0 16px 10px; }
.nwsp-reply [data-voice][hidden] { display: none; }
.nwsp-reply__foot { padding: 14px 16px; border-top: 1px solid var(--s100); background: var(--surface, #fff); }
.nwsp-reply__foot .nwsp-btn--ghost { border: 1px solid var(--s200); }
.nwsp-reply__foot .grp { gap: 10px; }
.nwsp-btn--rec svg { color: var(--rose-600); }
.nwsp-nextwrap { display: inline-flex; align-items: center; gap: 6px; color: var(--s500); }
.nwsp-nextwrap .nwsp-select { min-height: 38px; border-radius: 12px; }
.nwsp-reply [data-act=send] { padding: 11px 22px; border-radius: 14px; font-weight: 800; box-shadow: 0 8px 18px rgba(5, 150, 105, .28); }

/* side panels */
.nwsp-panel { border-radius: 18px; padding: 18px; }
.nwsp-panel__head { border: 0; padding-bottom: 4px; font-size: calc(14px * var(--fs, 1)); font-weight: 800; }
.nwsp-panel__head svg { width: 18px; height: 18px; color: var(--s700); }
.nwsp-panel__head .nwsp-ico--amber svg { color: #f59e0b; }
.nwsp-panel__sub { font-size: calc(11px * var(--fs, 1)); font-weight: 500; color: var(--s400); }
.nwsp-panel__link { font-size: calc(11px * var(--fs, 1)); font-weight: 700; color: var(--b700); text-decoration: none; }
.nwsp-side .nwsp-panel .nwsp-field { border: 0; padding: 8px 0; }
.nwsp-side .nwsp-panel .nwsp-field > label { color: var(--s700); font-size: calc(12px * var(--fs, 1)); }
.nwsp-side .nwsp-panel select.nwsp-select { background-color: var(--surface, #fff); min-height: 44px; }
.nwsp-side .nwsp-panel select.nwsp-sel--prio-critical { color: var(--rose-600); }
.nwsp-side .nwsp-panel select.nwsp-sel--prio-high { color: var(--amber-700); }
.nwsp-slabox { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--rose-200); background: var(--rose-50); color: var(--rose-700); }
.nwsp-slabox b { display: block; font-size: calc(12px * var(--fs, 1)); color: var(--rose-600); }
.nwsp-slabox p { margin: 4px 0 0; font-size: calc(11px * var(--fs, 1)); line-height: 1.9; }
.nwsp-slabox__ico svg { width: 18px; height: 18px; }
.nwsp-slabox--warn { background: var(--amber-50); border-color: var(--amber-200); color: var(--amber-800); }
.nwsp-slabox--warn b { color: var(--amber-700); }
.nwsp-slabox--ok, .nwsp-slabox--done { background: var(--b50); border-color: var(--b200); color: var(--b800); }
.nwsp-slabox--ok b, .nwsp-slabox--done b { color: var(--b700); }
.nwsp-frow { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: calc(12px * var(--fs, 1)); color: var(--s500); }
.nwsp-frow__v { background: var(--b50); color: var(--b700); border: 1px solid var(--b200); border-radius: 8px; padding: 3px 10px; font-weight: 800; font-size: calc(11px * var(--fs, 1)); }
.nwsp-csatbox { border: 1px dashed var(--s300); background: var(--s50); border-radius: 14px; padding: 14px; text-align: center; margin-top: 8px; }
.nwsp-csatbox .nwsp-stars { display: flex; justify-content: center; gap: 4px; font-size: calc(22px * var(--fs, 1)); color: var(--s300); }
.nwsp-csatbox .nwsp-stars span.is-on { color: #f59e0b; }
.nwsp-csatbox p { margin: 8px 0 0; font-size: calc(11px * var(--fs, 1)); line-height: 1.9; color: var(--s500); }
.nwsp-tag--team { background: var(--s100); color: var(--s600); border-radius: 8px; font-size: calc(10px * var(--fs, 1)); padding: 2px 8px; font-weight: 700; }
.nwsp-side .nwsp-panel textarea[data-qnote] { border: 1px solid var(--s200); border-radius: 14px; padding: 12px; font-size: calc(12px * var(--fs, 1)); background: var(--s50); margin-top: 8px; }
.nwsp-root .nwsp-btn--dark { background: var(--s900) !important; color: #fff !important; border-color: var(--s900); }
.nwsp-root .nwsp-btn--dark:hover { background: var(--s800) !important; }
.nwsp-btn--block { display: flex; width: 100%; margin-top: 12px; padding: 12px; border-radius: 14px !important; }
.nwsp-cust { display: flex; align-items: center; gap: 12px; padding: 10px 0 14px; }
.nwsp-cust__av { width: 48px; height: 48px; border-radius: 14px; background: var(--b500); color: #fff; font-size: calc(20px * var(--fs, 1)); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(16, 185, 129, .3); flex-shrink: 0; }
.nwsp-cust b { display: block; font-size: calc(14px * var(--fs, 1)); color: var(--s900); }
.nwsp-cust .mono { display: block; font-size: calc(12px * var(--fs, 1)); color: var(--s500); font-family: ui-monospace, Menlo, Consolas, monospace; }
.nwsp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nwsp-stats > div { background: var(--s50); border: 1px solid var(--s100); border-radius: 14px; padding: 12px; }
.nwsp-stats small { display: block; font-size: calc(10px * var(--fs, 1)); color: var(--s400); margin-bottom: 4px; }
.nwsp-stats b { font-size: calc(14px * var(--fs, 1)); color: var(--s900); }

/* Thread header: title block on the start side, actions on the opposite side */
.nwsp-threadhead { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.nwsp-threadhead .nwsp-th__row { flex: 1 1 auto; min-width: 0; }
.nwsp-threadhead .nwsp-tags { order: 3; flex: 1 0 100%; }
.nwsp-threadhead .nwsp-threadhead__act { margin-inline-start: auto; flex-shrink: 0; flex-wrap: nowrap; }
@media (max-width: 900px) { .nwsp-threadhead .nwsp-threadhead__act { margin-inline-start: 0; flex-wrap: wrap; } }
.nwsp-th__id { font-weight: 700; } .nwsp-th__id b { font-weight: 900; }

/* ===== SMS settings page — gateway card, status banner and event rows ===== */
.nwsp-sms-sec { padding: 22px 24px; border-radius: 22px; }
.nwsp-sms-sech { border-bottom: 1px solid var(--s100); padding-bottom: 16px; margin-bottom: 14px; }
.nwsp-sms-sech__r { display: flex; align-items: center; gap: 14px; }
.nwsp-sms-sech h2 { font-size: calc(17px * var(--fs, 1)); font-weight: 900; flex-wrap: wrap; }
.nwsp-sms-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--b50); border: 1px solid var(--b100); color: var(--b600); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nwsp-sms-ico--blue { background: #eef2ff; border-color: #e0e7ff; color: #4f46e5; }
.nwsp-sms-badge { font-size: calc(10px * var(--fs, 1)); font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #f5f3ff; color: #6d28d9; border: 1px solid #ede9fe; }
.nwsp-sms-badge.is-green { background: var(--b50); color: var(--b700); border-color: var(--b200); }
.nwsp-sms-status { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--s200); background: var(--s50); margin: 6px 0 18px; }
.nwsp-sms-status.is-ready { background: #f0fdf7; border-color: var(--b200); }
.nwsp-sms-status b { display: block; font-size: calc(14px * var(--fs, 1)); } .nwsp-sms-status small { display: block; margin-top: 4px; color: var(--s500); font-size: calc(12px * var(--fs, 1)); }
.nwsp-sms-pill { display: inline-flex; align-items: center; gap: 7px; font-size: calc(11px * var(--fs, 1)); font-weight: 800; padding: 5px 12px; border-radius: 999px; background: var(--surface, #fff); color: var(--s500); border: 1px solid var(--s200); }
.nwsp-sms-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.nwsp-sms-pill.is-ok { color: var(--b700); border-color: var(--b200); background: var(--surface, #fff); }
.nwsp-sms .req { color: var(--rose-600); font-style: normal; }
.nwsp-sms-cred { border: 1px solid var(--s200); background: var(--s50); border-radius: 16px; padding: 16px 18px; margin-top: 6px; }
.nwsp-sms-cred__h { display: flex; align-items: center; gap: 8px; font-size: calc(13px * var(--fs, 1)); font-weight: 800; margin-bottom: 12px; color: var(--s800); }
.nwsp-sms-saved { color: var(--b700); font-weight: 700; font-size: calc(11px * var(--fs, 1)); }
.nwsp-sms-grouptitle { display: flex; align-items: center; gap: 8px; margin: 22px 0 4px; font-size: calc(12px * var(--fs, 1)); font-weight: 800; color: var(--s500); }
.nwsp-sms-grouptitle svg { color: var(--b600); }
.nwsp-sms-ev { border-top: 1px solid var(--s100); padding: 6px 0 16px; }
.nwsp-sms-ev .nwsp-sms-row { padding: 14px 0 10px; }
.nwsp-sms-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 14px 20px; align-items: center; background: transparent; border: 0; padding: 0; margin: 0; }
@media (max-width: 800px) { .nwsp-sms-box { grid-template-columns: 1fr; } }
.nwsp-sms-box__pat { display: flex; align-items: center; gap: 10px; }
.nwsp-sms-box__pat label { margin: 0; white-space: nowrap; font-size: calc(11px * var(--fs, 1)); color: var(--s500); }
.nwsp-sms-box__pat input { flex: 1; min-width: 0; background: var(--s50); }
.nwsp-sms-ev:not(.is-on) .nwsp-sms-box { opacity: .55; }
.nwsp-sms-vars { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.nwsp-sms-vars > span { font-size: calc(11px * var(--fs, 1)); color: var(--s500); }
.nwsp-sms-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--b200); background: var(--b50); color: var(--b800); border-radius: 10px; padding: 4px 10px; font-size: calc(11px * var(--fs, 1)); font-weight: 700; cursor: pointer; transition: transform .1s, background .15s; }
.nwsp-sms-chip:hover { background: var(--b100); }
.nwsp-sms-chip code { background: transparent; border: 0; padding: 0; font-size: calc(11px * var(--fs, 1)); color: var(--b700); }
.nwsp-sms-chip em { font-style: normal; font-size: calc(10px * var(--fs, 1)); color: var(--s500); background: var(--surface, #fff); border-radius: 6px; padding: 1px 6px; border: 1px solid var(--b100); }
.nwsp-sms-chip.is-copied { background: var(--b600); color: #fff; } .nwsp-sms-chip.is-copied code { color: #fff; }
.nwsp-sms-phones { margin-top: 12px; max-width: 520px; }
.nwsp-sms-tip { margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: var(--s50); border: 1px dashed var(--s300); }

/* ---- notification screens (e-mail and SMS): recipient switcher, events, variables */
.nwsp-nfy { margin-top: 6px; }
.nwsp-nfy__intro { margin: 0 0 14px; color: var(--s600); font-size: calc(13px * var(--fs, 1)); line-height: 2; }
.nwsp-nseg { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.nwsp-nseg__btn { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ic t" "ic n"; align-items: center; gap: 0 10px; text-align: start; padding: 12px 14px; border: 1px solid var(--s200); border-radius: 14px; background: var(--surface, #fff); cursor: pointer; font: inherit; color: var(--s700); }
.nwsp-nseg__btn > span { grid-area: ic; width: 34px; height: 34px; border-radius: 10px; background: var(--s50); display: inline-flex; align-items: center; justify-content: center; }
.nwsp-nseg__btn strong { grid-area: t; font-size: calc(13px * var(--fs, 1)); font-weight: 800; }
.nwsp-nseg__btn em { grid-area: n; font-style: normal; font-size: calc(11px * var(--fs, 1)); color: var(--s600); }
.nwsp-nseg__btn.is-active { border-color: var(--b600); background: var(--b50); box-shadow: 0 0 0 3px var(--b100); }
.nwsp-nseg__btn.is-active > span { background: var(--b600); color: #fff; }
.nwsp-ngroup__intro { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; padding: 12px 16px; border-radius: 14px; background: var(--s50); border: 1px solid var(--s100); }
.nwsp-ngroup__intro strong { font-size: calc(14px * var(--fs, 1)); }
.nwsp-ngroup__intro span { font-size: calc(12px * var(--fs, 1)); color: var(--s600); line-height: 1.9; }
.nwsp-ngroup[hidden], .nwsp-nev__body[hidden] { display: none; }
.nwsp-nev { border: 1px solid var(--s200); border-radius: 16px; background: var(--surface, #fff); margin-bottom: 12px; overflow: hidden; }
.nwsp-nev.is-off { background: var(--s50); }
.nwsp-nev__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; }
.nwsp-nev__head > div { display: flex; flex-direction: column; gap: 3px; }
.nwsp-nev__head strong { font-size: calc(14px * var(--fs, 1)); }
.nwsp-nev__head span { font-size: calc(12px * var(--fs, 1)); color: var(--s600); line-height: 1.8; }
.nwsp-nev__body { padding: 4px 18px 18px; border-top: 1px solid var(--s100); display: flex; flex-direction: column; gap: 12px; }
.nwsp-nev__lbl { display: flex; flex-direction: column; gap: 6px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s700); margin-top: 10px; }
.nwsp-nev__lbl small { font-weight: 500; color: var(--s600); }
.nwsp-nev__lbl input[type="text"], .nwsp-nev__lbl textarea { width: 100%; max-width: none; font-weight: 400; line-height: 2; }
.nwsp-nev__map { font-size: calc(12px * var(--fs, 1)); color: var(--s700); line-height: 2; }
.nwsp-nev__map ol { margin: 4px 0 0; padding-inline-start: 22px; }
.nwsp-nev__map code { background: var(--s50); border: 1px solid var(--s200); border-radius: 6px; padding: 1px 8px; }
.nwsp-nvars { border: 1px solid var(--s200); border-radius: 16px; background: var(--surface, #fff); padding: 14px 18px; margin-bottom: 16px; }
.nwsp-nvars__h { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.nwsp-nvars__h span { font-size: calc(12px * var(--fs, 1)); color: var(--s600); line-height: 1.9; transition: color .2s; }
.nwsp-nvars__h span.is-warn { color: #b45309; font-weight: 700; }
.nwsp-nvars__g { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px dashed var(--s100); }
.nwsp-nvars__g > b { min-width: 74px; font-size: calc(12px * var(--fs, 1)); color: var(--s600); }
.nwsp-nvar { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--s200); border-radius: 999px; background: var(--s50); cursor: pointer; font: inherit; font-size: calc(12px * var(--fs, 1)); color: var(--s700); }
.nwsp-nvar code { font-size: calc(11px * var(--fs, 1)); color: var(--b600); background: transparent; padding: 0; }
.nwsp-nvar:hover { border-color: var(--b600); background: var(--b50); }
@media (max-width: 760px) { .nwsp-nev__head { flex-wrap: wrap; } }

/* full width inside the 2-column settings form, and a livelier look */
.nwsp-apage .nwsp-form > .nwsp-nfy, .nwsp-apage .nwsp-form > .nwsp-formstack { grid-column: 1 / -1; }
.nwsp-apage .nwsp-form:has(> .nwsp-nfy) { display: block; }
.nwsp-apage .nwsp-form:has(> .nwsp-nfy) > * + * { margin-top: 18px; }
.nwsp-nfy { width: 100%; }
.nwsp-nfy__intro { padding: 14px 18px; border-radius: 16px; background: linear-gradient(135deg, var(--b50), #fff); border: 1px solid var(--b100); }
.nwsp-nseg { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.nwsp-nseg__btn { padding: 16px 18px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.nwsp-nseg__btn:hover { transform: translateY(-2px); border-color: var(--b200); }
.nwsp-nseg__btn > span { width: 42px; height: 42px; border-radius: 12px; }
.nwsp-nseg__btn strong { font-size: calc(14px * var(--fs, 1)); }
.nwsp-nseg__btn.is-active { background: linear-gradient(135deg, var(--b50), #fff); }
.nwsp-nev { border-inline-start: 4px solid var(--s200); transition: box-shadow .15s, border-color .15s; }
.nwsp-nev:not(.is-off) { border-inline-start-color: var(--b600); box-shadow: 0 6px 22px rgba(15, 23, 42, .06); }
.nwsp-nev__head { padding: 18px 22px; }
.nwsp-nev__head strong { font-size: calc(15px * var(--fs, 1)); font-weight: 900; }
.nwsp-nev__body { padding: 6px 22px 22px; }
.nwsp-nev__lbl input[type="text"], .nwsp-nev__lbl textarea { padding: 11px 14px; border-radius: 12px; }
.nwsp-nev .nwsp-chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.nwsp-nvars { background: linear-gradient(135deg, #fff, var(--s50)); }
.nwsp-nvar { padding: 6px 12px; font-weight: 600; }
.nwsp-nvar:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }
.nwsp-sms .nwsp-nfy .nwsp-sms-phones, .nwsp-sms .nwsp-nfy .nwsp-sms-tip { margin-bottom: 14px; }
.nwsp-apage .nwsp-form.nwsp-form--flow { display: block; padding: 0; background: transparent; border: 0; box-shadow: none; }
.nwsp-apage .nwsp-form--flow > * + * { margin-top: 20px; }
.nwsp-apage .nwsp-form--flow .nwsp-dp-head { padding: 18px 22px; }
.nwsp-nvars { position: relative; }
.nwsp-nvars__toast { position: sticky; bottom: 8px; margin-top: 10px; display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--b600); color: #fff; font-size: calc(12px * var(--fs, 1)); font-weight: 700; box-shadow: 0 6px 18px rgba(5, 150, 105, .3); }
.nwsp-nvars__toast[hidden] { display: none; }
.nwsp-nvar { border-color: var(--b100); background: #f5f3ff; }
.nwsp-nvar code { color: #6d28d9; font-weight: 800; }
.nwsp-nvar:hover { border-color: #7c3aed; background: #ede9fe; }
.nwsp-nev__warn { margin: 6px 0 0; color: #b45309; font-weight: 700; }
.nwsp-sms-prov-help { margin: 12px 0 4px; padding: 12px 16px; border-radius: 14px; background: var(--b50); border: 1px solid var(--b100); color: var(--s700); font-size: calc(12.5px * var(--fs, 1)); line-height: 2; }
.nwsp-sms .nwsp-dp-f[hidden], .nwsp-sms [data-only][hidden], .nwsp-sms [data-sms-only][hidden] { display: none !important; }
/* collapsible variable list, green chips */
.nwsp-nvars { padding: 0; }
.nwsp-nvars__sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.nwsp-nvars__sum::-webkit-details-marker { display: none; }
.nwsp-nvars__sum strong { font-size: calc(14px * var(--fs, 1)); font-weight: 900; }
.nwsp-nvars__sum em { font-style: normal; font-size: calc(12px * var(--fs, 1)); color: var(--s600); }
.nwsp-nvars__sum::after { content: ''; width: 9px; height: 9px; border-inline-end: 2px solid var(--b600); border-bottom: 2px solid var(--b600); transform: rotate(45deg); transition: transform .2s; margin-inline-start: auto; flex-shrink: 0; }
.nwsp-nvars[open] > .nwsp-nvars__sum::after { transform: rotate(-135deg); }
.nwsp-nvars[open] > .nwsp-nvars__sum { border-bottom: 1px solid var(--s100); }
.nwsp-nvars > .nwsp-nvars__h, .nwsp-nvars > .nwsp-nvars__g, .nwsp-nvars > .nwsp-nvars__toast { margin-inline: 18px; }
.nwsp-nvars > .nwsp-nvars__h { margin-top: 12px; margin-bottom: 6px; }
.nwsp-nvars > .nwsp-nvars__g:last-of-type { margin-bottom: 14px; }
.nwsp-nvar { border-color: var(--b100); background: var(--b50); }
.nwsp-nvar code { color: var(--b600); }
.nwsp-nvar:hover { border-color: var(--b600); background: var(--b100, #d1fae5); }

/* ---- custom fields screen */
.nwsp-fnote { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 16px; background: #eff6ff; border: 1px solid #dbeafe; color: #1e3a8a; }
.nwsp-fnote p { margin: 0; font-size: calc(13px * var(--fs, 1)); line-height: 2; }
.nwsp-fgrid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .nwsp-fgrid { grid-template-columns: minmax(0, 1fr) 380px; } }
.nwsp-fmain { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.nwsp-fcard { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.nwsp-fcard__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--s100); }
.nwsp-fcard__h h2 { margin: 0; font-size: calc(15px * var(--fs, 1)); font-weight: 900; display: flex; align-items: center; gap: 8px; }
.nwsp-fcard__h p { margin: 0; width: 100%; font-size: calc(12px * var(--fs, 1)); color: var(--s600); }
.nwsp-fcard__f { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--s100); background: var(--s50); }
.nwsp-fbar { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.nwsp-fsearch { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--s200); border-radius: 12px; background: var(--s50); color: var(--s600); }
.nwsp-fsearch input { border: 0 !important; background: transparent !important; box-shadow: none !important; flex: 1; padding: 10px 0; }
.nwsp-fbar select { max-width: 220px; border-radius: 12px; }
.nwsp-flist { list-style: none; margin: 0; padding: 0; }
.nwsp-fitem { display: grid; grid-template-columns: 24px minmax(160px, 1.6fr) auto minmax(120px, 1.2fr) auto auto; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--s100); background: var(--surface, #fff); transition: background .15s; }
.nwsp-fitem[hidden] { display: none; }
.nwsp-fitem:hover { background: var(--s50); }
.nwsp-fitem.is-drag { opacity: .45; background: var(--b50); }
.nwsp-fdrag { cursor: grab; color: var(--s400); letter-spacing: -3px; user-select: none; }
.nwsp-ftitle { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nwsp-ftitle strong { font-size: calc(14px * var(--fs, 1)); display: flex; align-items: center; gap: 8px; }
.nwsp-ftitle small { color: var(--s400); font-family: monospace; font-size: calc(11px * var(--fs, 1)); }
.nwsp-fdot { width: 8px; height: 8px; border-radius: 50%; background: var(--s300); flex-shrink: 0; }
.nwsp-fdot.is-on { background: var(--b600); box-shadow: 0 0 0 3px var(--b100); }
.nwsp-fdeps, .nwsp-fflags { display: flex; flex-wrap: wrap; gap: 4px; }
.nwsp-fact { display: flex; gap: 6px; align-items: center; }
.nwsp-fchip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--s50); border: 1px solid var(--s200); color: var(--s700); font-size: calc(11px * var(--fs, 1)); font-weight: 700; white-space: nowrap; }
.nwsp-fchip--dept { background: var(--b50); border-color: var(--b100); color: var(--b700, var(--b700, #047857)); }
.nwsp-fchip--all { background: #eff6ff; border-color: #dbeafe; color: #1d4ed8; }
.nwsp-fchip--req { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.nwsp-fchip--priv { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.nwsp-ibtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--s200); border-radius: 10px; background: var(--surface, #fff); color: var(--s700); cursor: pointer; padding: 0; }
.nwsp-ibtn:hover { border-color: var(--b600); color: var(--b600); background: var(--b50); }
.nwsp-ibtn--danger:hover { border-color: #e11d48; color: #e11d48; background: #fff1f2; }
.nwsp-ract { display: inline-flex; margin: 0; }
.nwsp-fempty { padding: 26px 20px; color: var(--s600); font-size: calc(13px * var(--fs, 1)); text-align: center; list-style: none; }
.nwsp-fpresets__g { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; padding: 16px 20px 20px; }
.nwsp-fpreset { width: 100%; display: flex; gap: 12px; align-items: center; text-align: start; padding: 12px 14px; border: 1px dashed var(--b200, var(--b200, #a7f3d0)); border-radius: 14px; background: var(--b50); cursor: pointer; font: inherit; color: var(--s800); transition: transform .15s, box-shadow .15s; }
.nwsp-fpreset:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(5, 150, 105, .15); }
.nwsp-fpreset > span { width: 36px; height: 36px; border-radius: 10px; background: var(--surface, #fff); display: inline-flex; align-items: center; justify-content: center; color: var(--b600); flex-shrink: 0; }
.nwsp-fpreset strong { display: block; font-size: calc(13px * var(--fs, 1)); }
.nwsp-fpreset small { color: var(--s600); font-size: calc(11px * var(--fs, 1)); }
.nwsp-fside { position: sticky; top: 40px; }
.nwsp-fform__b { padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.nwsp-ff { display: flex; flex-direction: column; gap: 6px; font-size: calc(12px * var(--fs, 1)); font-weight: 800; color: var(--s700); margin-top: 6px; }
.nwsp-ff em { color: #e11d48; font-style: normal; }
.nwsp-ff small { color: var(--s600); font-weight: 500; font-size: calc(11px * var(--fs, 1)); }
.nwsp-ff input[type="text"], .nwsp-ff select, .nwsp-ff textarea { width: 100%; max-width: none; font-weight: 400; }
.nwsp-ff[hidden] { display: none; }
.nwsp-ff__t { font-weight: 800; }
.nwsp-fdeps-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.nwsp-fsw { display: flex; flex-direction: column; gap: 10px; }
.nwsp-fsw__r { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--s50); border: 1px solid var(--s100); }
.nwsp-fsw__r strong { display: block; font-size: calc(13px * var(--fs, 1)); }
.nwsp-fsw__r small { color: var(--s600); font-size: calc(11px * var(--fs, 1)); line-height: 1.8; }
.nwsp-fprev { margin-top: 18px; }
.nwsp-fprev__b { padding: 8px 20px 22px; }
.nwsp-fprev__b > .nwsp-ff { max-width: 320px; }
.nwsp-fprev__f { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 14px; padding: 18px; border-radius: 16px; background: var(--s50); border: 1px solid var(--s100); }
.nwsp-fprev__i { display: flex; flex-direction: column; gap: 6px; }
.nwsp-fprev__i label { font-size: calc(12px * var(--fs, 1)); font-weight: 800; color: var(--s700); }
.nwsp-fprev__i input[type="text"], .nwsp-fprev__i input[type="number"], .nwsp-fprev__i input[type="url"], .nwsp-fprev__i input[type="date"], .nwsp-fprev__i select, .nwsp-fprev__i textarea { width: 100%; max-width: none; }
.nwsp-fprev__i small { color: var(--s600); font-size: calc(11px * var(--fs, 1)); }
.nwsp-fprev__radios { display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 760px) { .nwsp-fitem { grid-template-columns: 24px 1fr auto; } .nwsp-fitem .nwsp-ftype, .nwsp-fitem .nwsp-fdeps, .nwsp-fitem .nwsp-fflags { grid-column: 2 / -1; } .nwsp-fside { position: static; } }

/* ---- support terms: per-product table */
.nwsp-svprod { margin-top: 18px; }
.nwsp-svprod__hint { margin: 0; padding: 14px 22px; font-size: calc(12.5px * var(--fs, 1)); line-height: 2; color: var(--s600); border-bottom: 1px solid var(--s100); }
.nwsp-svprod__search { display: flex; gap: 8px; padding: 14px 22px; flex-wrap: wrap; }
.nwsp-svprod__search input[type="search"] { flex: 1; min-width: 200px; border-radius: 12px; }
.nwsp-svprod__wrap { overflow-x: auto; padding: 0 22px 8px; }
.nwsp-svprod .nwsp-table input[type="number"] { width: 100%; max-width: 170px; }
.nwsp-svprod__pager { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 22px 18px; }

/* ---- order message templates */
.nwsp-ogrid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; margin-top: 18px; }
@media (min-width: 1100px) { .nwsp-ogrid { grid-template-columns: minmax(0, 1fr) 340px; } }
.nwsp-omain { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.nwsp-oside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 40px; }
@media (max-width: 1099px) { .nwsp-oside { position: static; } }
#nwsp-ocards { display: flex; flex-direction: column; gap: 14px; }
.nwsp-ocard { background: var(--surface, #fff); border: 1px solid var(--s200); border-inline-start: 4px solid var(--b600); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; transition: opacity .15s; }
.nwsp-ocard.is-off { border-inline-start-color: var(--s300); background: var(--s50); }
.nwsp-ocard.is-off .nwsp-ocard__b { opacity: .6; }
.nwsp-ocard__h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--s100); }
.nwsp-ocard__h h3 { margin: 0; font-size: calc(15px * var(--fs, 1)); font-weight: 900; }
.nwsp-ocard__n { width: 28px; height: 28px; border-radius: 50%; background: var(--b50); border: 1px solid var(--b100); color: var(--b600); display: inline-flex; align-items: center; justify-content: center; font-size: calc(12px * var(--fs, 1)); font-weight: 800; }
.nwsp-ocard__act { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.nwsp-ocard__on { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; cursor: pointer; }
.nwsp-ocard__b { padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.nwsp-ocard__row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
@media (max-width: 760px) { .nwsp-ocard__row { grid-template-columns: 1fr; } }
.nwsp-ocard .nwsp-ff input[type="text"], .nwsp-ocard .nwsp-ff textarea { width: 100%; max-width: none; line-height: 2; }
.nwsp-ocard__quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: calc(12px * var(--fs, 1)); color: var(--s600); }
.nwsp-oadd { width: 100%; padding: 16px; border: 2px dashed var(--b200, var(--b200, #a7f3d0)); border-radius: 18px; background: var(--b50); color: var(--b700, var(--b700, #047857)); font: inherit; font-weight: 800; cursor: pointer; transition: background .15s, transform .15s; }
.nwsp-oadd:hover { background: var(--b100, #d1fae5); transform: translateY(-1px); }
.nwsp-ostat__b { display: flex; align-items: center; gap: 14px; padding: 16px 20px 20px; }
.nwsp-ostat__n { font-size: calc(34px * var(--fs, 1)); font-weight: 900; color: var(--s900); }
.nwsp-ostat__b strong { display: block; font-size: calc(13px * var(--fs, 1)); }
.nwsp-ostat__b small { color: var(--s600); font-size: calc(11px * var(--fs, 1)); }
.nwsp-oprev { background: #0f172a; border-color: #0f172a; color: #e2e8f0; }
.nwsp-oprev .nwsp-fcard__h { border-color: #1e293b; }
.nwsp-oprev .nwsp-fcard__h h2 { color: #fff; font-size: calc(13px * var(--fs, 1)); }
.nwsp-oprev .nwsp-fchip { background: #1e293b; border-color: #334155; color: #cbd5e1; }
.nwsp-odot { width: 8px; height: 8px; border-radius: 50%; background: var(--b400, #34d399); }
.nwsp-oprev__b { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.nwsp-oprev__who { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--surface, #fff); color: #0f172a; }
.nwsp-oprev__who small { display: block; color: var(--s600); font-size: calc(11px * var(--fs, 1)); }
.nwsp-oprev .nwsp-ff { color: #cbd5e1; }
.nwsp-oprev select { background: var(--surface, #fff); color: #0f172a; width: 100%; max-width: none; }
.nwsp-oprev__text { background: var(--surface, #fff); color: #334155; border-radius: 12px; padding: 12px 14px; font-size: calc(12px * var(--fs, 1)); line-height: 2.1; min-height: 96px; font-weight: 400; white-space: pre-wrap; }
.nwsp-oprev .nwsp-btn { width: 100%; justify-content: center; opacity: 1; }
.nwsp-oprev__note { margin: 0; font-size: calc(11px * var(--fs, 1)); color: #94a3b8; line-height: 1.9; }
.nwsp-olinks { display: flex; flex-direction: column; padding: 6px 12px 12px; }
.nwsp-olinks a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 8px; border-bottom: 1px solid var(--s100); text-decoration: none; color: var(--s700); font-size: calc(12.5px * var(--fs, 1)); font-weight: 700; }
.nwsp-olinks a:last-child { border-bottom: 0; }
.nwsp-olinks a:hover { color: var(--b600); }
.nwsp-ofoot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding: 14px 20px; background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 18px; box-shadow: var(--shadow); }

/* ---- live chat: assistant, notes, tools, consent */
.nwsp-bubble--ai { background: #f5f3ff; border-color: #ddd6fe; color: #4c1d95; }
.nwsp-bubble--ai small { color: #6d28d9; opacity: 1; }
.nwsp-bubble--note { align-self: center; max-width: 92%; background: #fffbeb; border: 1px dashed #fde68a; color: #92400e; text-align: center; }
.nwsp-typing span { animation: nwspPulse 1.2s infinite ease-in-out; }
@keyframes nwspPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.nwsp-chat__tools { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 12px 0; }
.nwsp-chat__tools:empty { display: none; }
.nwsp-chat__tools .nwsp-link { font-size: calc(11px * var(--fs, 1)); }
.nwsp-chat__consent { display: flex; gap: 8px; align-items: flex-start; font-size: calc(11px * var(--fs, 1)); color: var(--s600); line-height: 1.9; margin: 8px 0; }
.nwsp-bubble__src { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #ddd6fe; font-size: calc(10.5px * var(--fs, 1)); line-height: 1.9; }
.nwsp-bubble__src a { color: #6d28d9; text-decoration: underline; }
.nwsp-chat__guest { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; margin: 6px 12px; border: 1px solid var(--b200, #a7f3d0); background: var(--b50, #ecfdf5); border-radius: 12px; font-size: calc(11px * var(--fs, 1)); }
.nwsp-chat__guest p { margin: 0; line-height: 1.9; }
.nwsp-chat__rate { padding: 12px 14px; text-align: center; font-size: calc(12px * var(--fs, 1)); border-top: 1px solid var(--s100); }
.nwsp-chat__rate p { margin: 4px 0; }
.nwsp-stars { display: flex; justify-content: center; gap: 4px; margin: 6px 0; }
.nwsp-stars button { border: 0; background: none; font-size: calc(26px * var(--fs, 1)); line-height: 1; color: #d1d5db; cursor: pointer; padding: 0 2px; }
.nwsp-stars button.is-on { color: #f59e0b; }
/* While pointing at a star, the stars up to it light up (not only the one under the pointer). */
.nwsp-stars button.is-hot, .nwsp-star.is-hot { color: #fbbf24; transform: scale(1.08); }
.nwsp-stars:has(.is-hot) button:not(.is-hot) { color: #d1d5db; }
/* Same order as the stars (.nwsp-stars is left-to-right): the one-star label sits under the one-star end. */
.nwsp-rate__ends span { direction: rtl; }
.nwsp-rate__ends { direction: ltr; display: flex; justify-content: space-between; gap: 8px; width: 100%; max-width: 230px; margin: -2px auto 2px; font-size: calc(11px * var(--fs, 1)); color: var(--s500); }
.nwsp-rate__cap { margin: 2px 0 6px; font-size: calc(12px * var(--fs, 1)); color: var(--s500); min-height: 1.6em; }
.nwsp-rate__cap.is-set { color: #b45309; font-weight: 700; }

/* ---- messengers */
.nwsp-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }
.nwsp-mform { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.nwsp-mcard { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.nwsp-mcard.is-off { background: var(--s50); }
.nwsp-mcard__h { display: flex; align-items: center; gap: 16px; padding: 20px 24px; flex-wrap: wrap; }
.nwsp-mcard__badge { width: 52px; height: 52px; border-radius: 16px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: calc(15px * var(--fs, 1)); flex-shrink: 0; }
.nwsp-mcard__t { flex: 1; min-width: 220px; }
.nwsp-mcard__t h2 { margin: 0; font-size: calc(17px * var(--fs, 1)); font-weight: 900; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nwsp-mcard__t p { margin: 6px 0 0; font-size: calc(12.5px * var(--fs, 1)); color: var(--s600); line-height: 2; }
.nwsp-mstate { font-size: calc(11px * var(--fs, 1)); font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--s200); background: var(--s50); color: var(--s600); }
.nwsp-mstate--ok { background: var(--b50); border-color: var(--b100); color: var(--b700, var(--b700, #047857)); }
.nwsp-mstate--warn, .nwsp-mstate--unknown { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.nwsp-mstate--error { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.nwsp-mcard__b { padding: 4px 24px 22px; border-top: 1px solid var(--s100); display: flex; flex-direction: column; gap: 14px; }
.nwsp-mcard__b[hidden] { display: none; }
.nwsp-mcard__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin-top: 12px; }
.nwsp-mcard__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .nwsp-mcard__grid, .nwsp-mcard__grid--3 { grid-template-columns: minmax(0, 1fr); } }
.nwsp-mcard .nwsp-ff input[type="text"], .nwsp-mcard .nwsp-ff input[type="password"], .nwsp-mcard .nwsp-ff input[type="number"], .nwsp-mcard .nwsp-ff input[type="url"], .nwsp-mcard .nwsp-ff select { width: 100%; max-width: none; }
.nwsp-mpw { display: flex; gap: 6px; }
.nwsp-mpw input { flex: 1; }
.nwsp-mcard__more { border: 1px dashed var(--s200); border-radius: 14px; padding: 10px 14px; }
.nwsp-mcard__more > summary { cursor: pointer; font-size: calc(13px * var(--fs, 1)); font-weight: 800; color: var(--s700); }
.nwsp-mcard__more ol { margin: 10px 0 2px; padding-inline-start: 22px; font-size: calc(12.5px * var(--fs, 1)); line-height: 2.2; color: var(--s700); }
.nwsp-mcard__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.nwsp-mcard__status { display: flex; flex-direction: column; gap: 4px; font-size: calc(11.5px * var(--fs, 1)); color: var(--s600); padding-top: 4px; }
.nwsp-mcard__err { color: #be123c; font-weight: 700; }
.nwsp-mproxy { border: 1px solid #bae6fd; background: #f0f9ff; border-radius: 16px; padding: 14px 18px; }
.nwsp-mproxy__h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nwsp-mproxy__h strong { display: inline-flex; align-items: center; gap: 6px; font-size: calc(13px * var(--fs, 1)); }
.nwsp-mproxy__h span { flex: 1; font-size: calc(11.5px * var(--fs, 1)); color: var(--s600); min-width: 180px; }
.nwsp-mprev { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 14px; padding: 12px 14px; font-size: calc(12px * var(--fs, 1)); line-height: 2.1; color: var(--s700); }
.nwsp-mfoot__t { margin-inline-end: auto; font-size: calc(12px * var(--fs, 1)); color: var(--s600); align-self: center; }

/* multi-select dropdown (checkbox list inside <details>) */
.nwsp-msel { position: relative; min-width: 260px; max-width: 420px; }
.nwsp-msel > summary { list-style: none; display: block; min-height: 40px; line-height: 1.7; padding-block: 8px; border: 1px solid var(--b200); border-radius: 10px; background-color: var(--surface, #fff); color: var(--b800); font-size: calc(12px * var(--fs, 1)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline-start: 12px; }
.nwsp-msel > summary::-webkit-details-marker { display: none; }
.nwsp-msel__list { position: static; margin-top: 6px; max-height: 260px; overflow: auto; padding: 6px; background: var(--surface, #fff); border: 1px solid var(--b200); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .12); }
.nwsp-msel__opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: calc(12px * var(--fs, 1)); font-weight: 600; color: var(--b800); }
.nwsp-msel__opt:hover { background: var(--b50); }

/* ============ AI settings tab ============ */
.nwsp-apage .nwsp-form.nwsp-ai { display: block; }
.nwsp-apage .nwsp-form.nwsp-ai > * + * { margin-top: 18px; }
.nwsp-tg { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; cursor: pointer; margin: 0; }
.nwsp-tg input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.nwsp-tg span { position: absolute; inset: 0; border-radius: 999px; background: var(--s300); transition: .18s; }
.nwsp-tg span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface, #fff); box-shadow: 0 1px 3px rgba(15, 23, 42, .25); transition: .18s; }
.nwsp-tg input:checked + span { background: var(--b600); }
.nwsp-tg input:checked + span::after { inset-inline-start: 21px; }
.nwsp-tg input:focus-visible + span { outline: 2px solid var(--b600); outline-offset: 2px; }
.nwsp-tg--lg { width: 52px; height: 30px; }
.nwsp-tg--lg span::after { width: 24px; height: 24px; }
.nwsp-tg--lg input:checked + span::after { inset-inline-start: 25px; }
.nwsp-aimaster { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--b50); border-color: var(--b200); }
.nwsp-aimaster__ico { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; background: var(--surface, #fff); color: var(--b700); border: 1px solid var(--b200); }
.nwsp-aimaster__txt { flex: 1; min-width: 0; }
.nwsp-aimaster__txt strong { display: block; font-size: calc(14px * var(--fs, 1)); color: var(--s900); }
.nwsp-aimaster__txt span { display: block; margin-top: 3px; font-size: calc(12px * var(--fs, 1)); color: var(--s500); }
.nwsp-aiwarn { padding: 14px 18px; border-radius: 14px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: calc(12px * var(--fs, 1)); line-height: 2; }
.nwsp-aisec { padding: 0; overflow: hidden; }
.nwsp-aisec__h { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--s100); }
.nwsp-aisec__h h3 { margin: 0; font-size: calc(14px * var(--fs, 1)); font-weight: 800; color: var(--s900); }
.nwsp-aisec__h p { margin: 3px 0 0; font-size: calc(12px * var(--fs, 1)); color: var(--s500); }
.nwsp-aisec__h > div { flex: 1; min-width: 0; }
.nwsp-aisec__badge { display: inline-flex; min-width: 34px; height: 34px; padding: 0 8px; align-items: center; justify-content: center; border-radius: 10px; background: var(--b50); color: var(--b700); font-size: calc(12px * var(--fs, 1)); font-weight: 800; }
.nwsp-aisec__cnt { padding: 4px 12px; border-radius: 999px; background: var(--b50); color: var(--b700); border: 1px solid var(--b200); font-size: calc(11px * var(--fs, 1)); font-weight: 700; white-space: nowrap; }
.nwsp-aisec__b { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.nwsp-aimode { display: inline-flex; margin: 16px 22px 10px; padding: 4px; gap: 4px; background: var(--s100); border-radius: 12px; }
.nwsp-aimode label { margin: 0; cursor: pointer; }
.nwsp-aimode input { position: absolute; opacity: 0; }
.nwsp-aimode span { display: block; padding: 8px 16px; border-radius: 9px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s600); }
.nwsp-aimode input:checked + span { background: var(--surface, #fff); color: var(--s900); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.nwsp-aigrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 18px 22px; }
.nwsp-aigrid--2 { grid-template-columns: repeat(2, 1fr); }
.nwsp-aigrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nwsp-aigrid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nwsp-aicard { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--s200); border-radius: 14px; background: var(--surface, #fff); transition: .15s; }
.nwsp-aicard.is-on { border-color: var(--b200); background: linear-gradient(180deg, var(--b50), #fff 70%); }
.nwsp-aicard__h { display: flex; align-items: center; justify-content: space-between; }
.nwsp-aicard strong { font-size: calc(13px * var(--fs, 1)); color: var(--s900); }
.nwsp-aicard p { margin: 0; font-size: calc(12px * var(--fs, 1)); line-height: 1.9; color: var(--s500); }
.nwsp-aicard__ico { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 10px; background: var(--s100); color: var(--s700); }
.nwsp-aicard__ico.nwsp-tone-brand { background: var(--b50); color: var(--b700); }
.nwsp-aicard__ico.nwsp-tone-violet { background: var(--violet-50); color: var(--violet-800); }
.nwsp-aicard__ico.nwsp-tone-rose { background: var(--rose-50); color: var(--rose-700); }
.nwsp-aicard__ico.nwsp-tone-sky { background: var(--sky-50); color: var(--sky-800); }
.nwsp-aichk { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding-top: 8px; border-top: 1px dashed var(--s200); font-size: calc(11.5px * var(--fs, 1)); font-weight: 500; color: var(--s600); line-height: 1.8; }
.nwsp-aifield { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.nwsp-aifield > span:first-child { font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s700); }
.nwsp-aifield small { font-size: calc(11px * var(--fs, 1)); color: var(--s400); line-height: 1.8; }
.nwsp-aifield input[type="url"], .nwsp-aifield input[type="text"], .nwsp-aifield input[type="password"] { width: 100%; }
.nwsp-aifield .nwsp-unit { width: 100%; }
.nwsp-aifield .nwsp-unit input, .nwsp-apage .nwsp-aifield .nwsp-unit input[type="number"] { width: 100%; padding-inline-start: 90px; }
.nwsp-aidet { margin: 0 22px 18px; border: 1px solid var(--s200); border-radius: 12px; background: var(--s50); }
.nwsp-aidet > summary { cursor: pointer; padding: 12px 16px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s700); }
.nwsp-aidet[open] > summary { border-bottom: 1px solid var(--s200); }
.nwsp-aitime { display: flex; align-items: center; gap: 10px; }
.nwsp-aitime input { max-width: 130px; }
.nwsp-aimatrix .nwsp-table td:not(:first-child), .nwsp-aimatrix .nwsp-table th:not(:first-child) { text-align: center; }
.nwsp-aih { margin: 8px 0 0; font-size: calc(13px * var(--fs, 1)); color: var(--s800); }
.nwsp-aibar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border: 1px solid var(--s200); border-radius: 14px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px); }
@media (max-width: 900px) { .nwsp-aigrid, .nwsp-aigrid--2, .nwsp-aigrid2, .nwsp-aigrid3 { grid-template-columns: 1fr; } }

/* IRANSans everywhere in the admin screens (they are not inside .nwsp-root, so WP's admin font leaked in) */
.nwsp-apage, .nwsp-apage *, .nwsp-apage *::before, .nwsp-apage *::after,
.nwsp-settings, .nwsp-settings *, .nwsp-dp, .nwsp-dp *,
.nwsp-apage input, .nwsp-apage select, .nwsp-apage textarea, .nwsp-apage button, .nwsp-apage summary,
.nwsp-apage h1, .nwsp-apage h2, .nwsp-apage h3, .nwsp-apage h4, .nwsp-apage th, .nwsp-apage td, .nwsp-apage label {
	font-family: 'IRANSans', Tahoma, -apple-system, 'Segoe UI', sans-serif;
}
.nwsp-apage .nwsp-id, .nwsp-apage code, .nwsp-apage pre, .nwsp-apage .mono, .nwsp-apage .nwsp-html, .nwsp-apage input[dir="ltr"]::placeholder { font-family: ui-monospace, Menlo, Consolas, monospace; }
.nwsp-apage input[dir="ltr"] { font-family: 'IRANSans', Tahoma, sans-serif; }

/* AI first line: decision card in the ticket thread */
.nwsp-aidec { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-color: var(--violet-100); background: linear-gradient(180deg, var(--violet-50), #fff 80%); }
.nwsp-aidec strong { display: flex; align-items: center; gap: 8px; font-size: calc(14px * var(--fs, 1)); color: var(--s900); }
.nwsp-aidec p { margin: 0; font-size: calc(12px * var(--fs, 1)); line-height: 1.9; color: var(--s500); }
.nwsp-aidec__btns { display: flex; flex-wrap: wrap; gap: 10px; }
/* AI first line still working: a typing bubble from the assistant instead of a status card */
.nwsp-msg--typing { animation: nwsp-pop .25s ease-out; }
.nwsp-typing { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface, #fff); border: 1px solid var(--violet-100); border-radius: 16px; border-start-start-radius: 4px; }
.nwsp-typing__dots { display: inline-flex; gap: 4px; }
.nwsp-typing__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet-600); opacity: .35; animation: nwsp-typing 1.2s infinite ease-in-out; }
.nwsp-typing__dots i:nth-child(2) { animation-delay: .15s; }
.nwsp-typing__dots i:nth-child(3) { animation-delay: .3s; }
.nwsp-typing__t { font-size: calc(13px * var(--fs, 1)); color: var(--violet-800); font-weight: 600; }
.nwsp-typing__hint { margin: 10px 0 0; font-size: calc(11.5px * var(--fs, 1)); line-height: 1.9; color: var(--s500); }
@keyframes nwsp-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nwsp-typing__dots i, .nwsp-msg--typing { animation: none; opacity: .7; } }
.nwsp-body blockquote { margin: 10px 0; padding: 8px 12px; border-inline-start: 3px solid var(--b400); background: var(--b50); border-radius: 8px; font-size: calc(12px * var(--fs, 1)); color: var(--s700); }
.nwsp-body blockquote small a { color: var(--b700); }

/* Department: automatic answers (ready questions and answers) */
.nwsp-qa { padding: 16px; border: 1px solid var(--s200); border-radius: 14px; background: var(--s50); display: flex; flex-direction: column; gap: 12px; }
.nwsp-qa__h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: calc(14px * var(--fs, 1)); color: var(--s900); }
.nwsp-qa__cfg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nwsp-qa__list { display: flex; flex-direction: column; gap: 12px; }
.nwsp-qa__row { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 12px; }
.nwsp-qa__top { display: flex; align-items: center; gap: 10px; }
.nwsp-qa__top small { flex: 1; color: var(--s500); font-size: calc(11px * var(--fs, 1)); }
.nwsp-qa__opts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: calc(12px * var(--fs, 1)); color: var(--s700); }
.nwsp-qa__opts label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.nwsp-qa textarea, .nwsp-qa input[type="text"], .nwsp-qa select { width: 100%; }
.nwsp-qa__test { display: flex; gap: 10px; margin-bottom: 12px; }
.nwsp-qa__test input[type="text"] { flex: 1; }
@media (max-width: 760px) { .nwsp-qa__cfg { grid-template-columns: 1fr; } }
.nwsp-qa__tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--s100); }
.nwsp-qa__toolbtns { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.nwsp-qa__sug { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; padding: 14px; border: 1px solid var(--violet-100); border-radius: 12px; background: var(--violet-50); }
.nwsp-qa__sug label { display: flex; flex-direction: column; gap: 4px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s700); margin: 0; }
.nwsp-qa__sug input[type="text"], .nwsp-qa__sug textarea { width: 100%; }

/* ---- Responsive: ticket list, new ticket, ticket thread (mobile < 640, tablet 641-1023, laptop 1024+) ---- */
.nwsp-root { overflow-wrap: anywhere; }
.nwsp-root img, .nwsp-root video, .nwsp-root iframe { max-width: 100%; height: auto; }
.nwsp-root table { max-width: 100%; }
.nwsp-msg__body, .nwsp-msg__body * { max-width: 100%; }
.nwsp-msg__body pre, .nwsp-editor__area pre { overflow-x: auto; }
@media (max-width: 1023px) {
	.nwsp-cl-tools { flex-wrap: wrap; }
	.nwsp-cl-tools .nwsp-toolbar__group { flex-wrap: wrap; flex: 1 1 100%; }
	.nwsp-cl-tools .nwsp-search { flex: 1 1 100%; max-width: none; }
	.nwsp-cl-tools select.nwsp-select { flex: 1 1 140px; min-width: 0; }
	.nwsp-cl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nwsp-cols, .nwsp-np-body { grid-template-columns: minmax(0, 1fr); }
	.nwsp-side, .nwsp-np-side { position: static; }
	.nwsp-np-bar { bottom: 8px; }
	.nwsp-reply__foot { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 767px) {
	.nwsp-cl-top, .nwsp-topbar { padding: 12px 14px; }
	.nwsp-cl-top .nwsp-brand h2 { font-size: calc(15px * var(--fs, 1)); }
	.nwsp-cl-top .nwsp-btn, .nwsp-cl-top .nwsp-cl-btn { flex: 1 1 auto; justify-content: center; }
	.nwsp-tk { padding: 14px; flex-direction: column; align-items: stretch; gap: 12px; }
	.nwsp-tk__main { min-width: 0; gap: 10px; }
	.nwsp-tk__hash { display: none; }
	.nwsp-tk__title h3 { flex-basis: 100%; font-size: calc(14px * var(--fs, 1)); line-height: 1.7; }
	.nwsp-tk__meta { gap: 8px 12px; }
	.nwsp-tk__side { flex-direction: row-reverse; justify-content: space-between; width: 100%; }
	.nwsp-tk__side .nwsp-tk__go { flex: 1; justify-content: center; min-height: 40px; }
	.nwsp-tk__menu { inset-inline-end: auto; inset-inline-start: 0; }
	.nwsp-threadhead { padding: 14px; gap: 10px; }
	.nwsp-threadhead h2 { font-size: calc(14px * var(--fs, 1)); line-height: 1.8; }
	.nwsp-threadhead .nwsp-threadhead__act { width: 100%; }
	.nwsp-threadhead .nwsp-threadhead__act .nwsp-btn { flex: 1 1 calc(50% - 6px); justify-content: center; }
	.nwsp-msg__head { flex-wrap: wrap; padding: 12px 14px; row-gap: 6px; }
	.nwsp-msg__who { flex-wrap: wrap; min-width: 0; }
	.nwsp-msg__body, .nwsp-msg > .nwsp-msg__text { padding: 12px 14px; }
	.nwsp-av { width: 34px; height: 34px; border-radius: 10px; }
	.nwsp-editor__bar { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
	.nwsp-editor__bar > * { flex-shrink: 0; }
	.nwsp-editor__area { min-height: 130px; padding: 12px; }
	.nwsp-np-card .nwsp-editor__area { min-height: 180px; }
	.nwsp-np-head { flex-direction: column; align-items: flex-start; gap: 10px; }
	.nwsp-np-card, .nwsp-np-card { padding: 16px; }
	.nwsp-np-bar { padding: 10px 12px; }
	.nwsp-np-bar__l, .nwsp-np-bar__r { width: 100%; }
	.nwsp-np-bar__l .nwsp-btn { flex: 1; justify-content: center; min-height: 42px; }
	.nwsp-reply__tabs { overflow-x: auto; flex-wrap: nowrap; }
	.nwsp-reply__tabs > * { flex-shrink: 0; }
	.nwsp-reply__foot > *, .nwsp-reply__foot .nwsp-btn { max-width: 100%; }
	.nwsp-kv { grid-template-columns: minmax(0, 1fr); }
	.nwsp-root input, .nwsp-root select, .nwsp-root textarea { font-size: calc(16px * var(--fs, 1)); }
}
@media (max-width: 400px) {
	.nwsp-cl-kpis { grid-template-columns: minmax(0, 1fr); }
	.nwsp-threadhead .nwsp-threadhead__act .nwsp-btn { flex-basis: 100%; }
}
@media (max-width: 1023px) {
	.nwsp-cl-tools .nwsp-toolbar__group { display: contents; }
	.nwsp-cl-tools .nwsp-search { order: 1; flex: 1 1 100%; }
	.nwsp-cl-tools select.nwsp-select { order: 2; }
	.nwsp-cl-tools .nwsp-viewtog { order: 3; }
	.nwsp-cl-tools .nwsp-cl-btn { order: 4; margin-inline-start: auto; }
}
@media (max-width: 767px) {
	.nwsp-tk { padding: 16px; gap: 14px; }
	.nwsp-tk__main { gap: 12px; }
	.nwsp-tk__title { gap: 10px 8px; }
	.nwsp-tk__title h3 { font-size: calc(16px * var(--fs, 1)); line-height: 1.7; margin-bottom: 2px; }
	.nwsp-tk__id, .nwsp-tk__title .nwsp-pill, .nwsp-tk__title .nwsp-tag { font-size: calc(12px * var(--fs, 1)); padding: 4px 11px; border-radius: 9px; }
	.nwsp-tk__last { font-size: calc(13.5px * var(--fs, 1)); line-height: 1.9; margin: 10px 0 12px; color: var(--s600); -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
	.nwsp-tk__meta { font-size: calc(12.5px * var(--fs, 1)); gap: 10px 16px; padding-top: 12px; border-top: 1px dashed var(--s200); }
	.nwsp-tk__meta svg { width: 15px; height: 15px; }
	.nwsp-tk__dept { padding: 5px 12px; font-size: calc(12.5px * var(--fs, 1)); }
	.nwsp-tk__side .nwsp-tk__go { font-size: calc(13.5px * var(--fs, 1)); min-height: 44px; }
	.nwsp-tk__dots { width: 44px; height: 44px; }
}
@media (max-width: 767px) {
	.nwsp-cl-list { gap: 18px; }
	.nwsp-cl-list > * + * { margin-top: 0; }
	.nwsp-tk { padding: 20px 18px; gap: 20px; }
	.nwsp-tk__title { gap: 12px 10px; margin-bottom: 4px; }
	.nwsp-tk__title h3 { margin-bottom: 6px; }
	.nwsp-tk__last { margin: 14px 0 18px; line-height: 2; }
	.nwsp-tk__meta { gap: 14px 18px; padding-top: 16px; }
	.nwsp-tk__meta > span { margin-inline-end: 4px; }
	.nwsp-tk__side { gap: 14px; padding-top: 4px; }
}
@media (min-width: 768px) {
	.nwsp-cl-list { gap: 16px; }
	.nwsp-tk { padding: 22px 26px; gap: 20px; }
	.nwsp-tk__main { gap: 16px; }
	.nwsp-tk__title { gap: 10px 10px; margin-bottom: 2px; }
	.nwsp-tk__title h3 { font-size: calc(16px * var(--fs, 1)); margin-inline-end: 4px; }
	.nwsp-tk__id, .nwsp-tk__title .nwsp-pill, .nwsp-tk__title .nwsp-tag { font-size: calc(11.5px * var(--fs, 1)); padding: 3px 11px; }
	.nwsp-tk__last { font-size: calc(13.5px * var(--fs, 1)); line-height: 1.9; margin: 10px 0 14px; }
	.nwsp-tk__meta { font-size: calc(12.5px * var(--fs, 1)); gap: 12px 20px; }
	.nwsp-tk__meta svg { width: 14px; height: 14px; }
	.nwsp-tk__dept { padding: 4px 12px; }
	.nwsp-tk__go { font-size: calc(13px * var(--fs, 1)); padding: 10px 18px; }
}
@media (min-width: 768px) {
	.nwsp-tk { padding: 26px 30px; }
	.nwsp-tk__title { gap: 12px 12px; margin-bottom: 8px; }
	.nwsp-tk__title h3 { margin-inline-end: 8px; }
	.nwsp-tk__last { margin: 16px 0 22px; line-height: 2; }
	.nwsp-tk__meta { gap: 14px 26px; }
	.nwsp-tk__meta > span { gap: 7px; }
	.nwsp-tk__dept { padding: 6px 14px; margin-inline-end: 6px; }
}
.nwsp-dp-agentx { border: 0; background: transparent; color: var(--s500, #64748b); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.nwsp-dp-agentx:hover { color: #e11d48; }
.nwsp-dp-agentsearch { position: relative; margin-top: 10px; }
.nwsp-dp-agentsearch input[type=search] { width: 100%; max-width: none; border: 1px solid var(--s200); border-radius: 14px; padding: 11px 14px; font-size: calc(13px * var(--fs, 1)); background: var(--surface, #fff); color: var(--s900); box-shadow: none; min-height: 0; }
.nwsp-dp-agentsearch input[type=search]:focus { border-color: var(--b600); outline: none; box-shadow: 0 0 0 3px rgba(5, 150, 105, .12); }
.nwsp-dp-f .nwsp-hint { margin: 8px 0 0; font-size: calc(12px * var(--fs, 1)); font-weight: 500; line-height: 1.7; color: var(--s400); }
.nwsp-dp-agents:empty { display: none; }
.nwsp-dp-asresults { position: absolute; inset-inline: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--s200, #e2e8f0); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); max-height: 240px; overflow: auto; margin-top: 4px; }
.nwsp-dp-asresults button { display: block; width: 100%; text-align: start; border: 0; background: transparent; padding: 9px 12px; font: inherit; cursor: pointer; }
.nwsp-dp-asresults button:hover { background: var(--b50, #eff6ff); }
.nwsp-dp-asresults em { display: block; padding: 9px 12px; color: var(--s500, #64748b); font-style: normal; }
.nwsp-dp-asresults em.is-busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-inline-end: 8px; vertical-align: -2px; border: 2px solid var(--s300, #cbd5e1); border-top-color: var(--b500, #3b82f6); border-radius: 50%; animation: nwsp-dp-spin .7s linear infinite; }
@keyframes nwsp-dp-spin { to { transform: rotate(360deg); } }

.nwsp-savingbar { position: fixed; top: 46px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 100000; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: #0f172a; color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px rgba(15, 23, 42, .25); }
.nwsp-savingbar .nwsp-spinner--sm { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.nwsp-contact { position: relative; padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--s200); border-radius: 14px; background: var(--s50); }
.nwsp-contact h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: calc(14px * var(--fs, 1)); }
.nwsp-contact .nwsp-hint { margin: 0 0 10px; }

/* FAQ page before the new-ticket form */
.nwsp-faq > header h2 { margin: 0 0 14px; }
.nwsp-faq__intro { padding: 14px 18px; margin-bottom: 16px; border-radius: 14px; background: var(--b50, #eff6ff); border-inline-start: 3px solid var(--b600, #059669); line-height: 2; font-size: calc(13px * var(--fs, 1)); color: var(--s700); }
.nwsp-faq__dept { margin-bottom: 16px; }
.nwsp-faq__list { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--s50, #f8fafc); }
.nwsp-faq__item { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 14px; }
.nwsp-faq__item > summary { cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: calc(13px * var(--fs, 1)); color: var(--s900); list-style: none; }
.nwsp-faq__item > summary::-webkit-details-marker { display: none; }
.nwsp-faq__item[open] > summary { border-bottom: 1px solid var(--s200); }
.nwsp-faq__body { padding: 14px 18px; line-height: 2; font-size: calc(13px * var(--fs, 1)); color: var(--s700); }
.nwsp-faq__foot { display: flex; justify-content: center; margin-top: 22px; }
.nwsp-dp-f textarea { width: 100%; max-width: none; border: 1px solid var(--s200); border-radius: 14px; padding: 11px 14px; font-size: calc(13px * var(--fs, 1)); background: var(--surface, #fff); color: var(--s900); box-shadow: none; }
.nwsp-dp-f textarea:focus { border-color: var(--b600); outline: none; box-shadow: 0 0 0 3px rgba(5, 150, 105, .12); }
.nwsp-kbp-set { margin-bottom: 18px; }

/* Editor toolbar icons are dashicons in the WordPress editor skin; the plugin-wide font rule must not replace them */
.nwsp-apage i.mce-ico, .nwsp-apage i.mce-ico::before, .nwsp-dp i.mce-ico, .nwsp-dp i.mce-ico::before, .nwsp-settings i.mce-ico, .nwsp-settings i.mce-ico::before { font-family: 'dashicons' !important; }
.nwsp-root button.nwsp-chat__end { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; padding: 6px 14px !important; border: 1px solid var(--rose-200) !important; background: var(--rose-50) !important; color: var(--rose-700) !important; border-radius: 999px !important; font-size: calc(12px * var(--fs, 1)); font-weight: 800; line-height: 1.6; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; }
.nwsp-root button.nwsp-chat__end svg.i { width: 14px; height: 14px; }
.nwsp-root button.nwsp-chat__end:hover { background: var(--rose-600) !important; border-color: var(--rose-600) !important; color: #fff !important; box-shadow: 0 6px 16px rgba(225, 29, 72, .28); transform: translateY(-1px); }


.nwsp-slots__h{display:flex;flex-direction:column;gap:2px;margin-bottom:8px}.nwsp-slots__h small{color:var(--s500);font-size:calc(12px * var(--fs, 1))}
.nwsp-nev__slots{background:#fffbeb;border:1px dashed #f59e0b;border-radius:14px;padding:12px 14px;margin-top:8px}
.nwsp-slots__r{display:flex;gap:8px;align-items:center;margin-bottom:8px}.nwsp-slots__r code{min-width:90px;text-align:center;background:#fff;border:1px solid #fcd34d;border-radius:10px;padding:8px 10px;color:#b45309;font-weight:700}
.nwsp-slots__r select{flex:1}.nwsp-slots__x{border:1px solid #fecaca;background:#fff;color:#dc2626;border-radius:10px;width:36px;height:36px;cursor:pointer}
.nwsp-slots__add{border:1px solid var(--s200);background:#fff;border-radius:10px;padding:8px 14px;cursor:pointer}

/* new-ticket form (classic): tidier card, consistent fields, notification choices */
.nwsp-formcard { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 20px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(15, 23, 42, .05); }
.nwsp-formcard > header { padding-bottom: 16px; margin-bottom: 20px; }
.nwsp-formcard form > * + * { margin-top: 20px; }
.nwsp-createform .nwsp-label { margin-bottom: 6px; }
.nwsp-createform .nwsp-input--lg, .nwsp-createform .nwsp-select--lg { border-radius: 12px; min-height: 46px; }
.nwsp-createform .nwsp-input:focus, .nwsp-createform .nwsp-select:focus { border-color: var(--b500, #10b981); box-shadow: 0 0 0 3px rgba(16, 185, 129, .15); outline: 0; }
.nwsp-createform .nwsp-dual { align-items: stretch; }
.nwsp-createform .nwsp-drop, .nwsp-createform .nwsp-voice { border-radius: 16px; min-height: 100%; justify-content: center; }
.nwsp-notifybox { border: 1px solid var(--s200); background: rgba(248, 250, 252, .7); border-radius: 16px; padding: 16px; }
.nwsp-notifybox > .nwsp-label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.nwsp-notifybox .nwsp-grid2 { gap: 12px; }
.nwsp-notifybox .nwsp-notify { background: var(--surface, #fff); margin: 0; }
.nwsp-notifybox .nwsp-notify:has(input:checked) { border-color: var(--b500, #10b981); background: var(--b50); }
.nwsp-notifybox .nwsp-notify.is-off { background: var(--s50, #f8fafc); }
.nwsp-createform .nwsp-formfoot { margin-top: 24px; padding-top: 18px; }

/* admin "new ticket" page: breadcrumb header, one main card, customer profile + tips on the side */
.nwsp-np-head--admin { background: none; border: 0; box-shadow: none; padding: 4px 2px 18px; border-bottom: 1px solid var(--s200); border-radius: 0; margin-bottom: 22px; align-items: flex-start; }
.nwsp-np-head__main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nwsp-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: calc(12px * var(--fs, 1)); color: var(--s500); }
.nwsp-crumbs a { color: var(--s500); text-decoration: none; }
.nwsp-crumbs a:hover { color: var(--b700); }
.nwsp-crumbs i { font-style: normal; color: var(--s300); }
.nwsp-crumbs b { color: var(--s700); font-weight: 700; }
.nwsp-np-head--admin .nwsp-np-ico { width: 52px; height: 52px; border: 0; color: #fff; background: linear-gradient(135deg, var(--b500, #10b981), var(--b700, #047857)); box-shadow: 0 8px 18px rgba(5, 150, 105, .25); }
.nwsp-np-head--admin h2 { font-size: calc(22px * var(--fs, 1)); }
.nwsp-np-head--admin .nwsp-btn--ghost { border-radius: 14px; background: var(--surface, #fff); }

.nwsp-newpage--admin .nwsp-np-main { background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 22px; box-shadow: var(--shadow); padding: 8px 28px 28px; }
.nwsp-newpage--admin .nwsp-np-main > * + * { margin-top: 0; }
.nwsp-newpage--admin .nwsp-np-main > .nwsp-np-card { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 22px 0 0; }
.nwsp-newpage--admin .nwsp-np-main > .nwsp-np-card + .nwsp-np-card { border-top: 1px solid var(--s100); margin-top: 22px; }
.nwsp-newpage--admin .nwsp-np-main > .nwsp-np-card:first-child > .nwsp-np-card__h { display: none; }
.nwsp-newpage--admin .nwsp-np-main .nwsp-np-card__h { border-bottom: 0; padding-bottom: 0; }
.nwsp-newpage--admin .nwsp-np-main .nwsp-input--lg, .nwsp-newpage--admin .nwsp-np-main .nwsp-select--lg { min-height: 48px; }

.nwsp-picker--np .nwsp-picker__change { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); z-index: 2; }
.nwsp-picker--np.is-chosen .nwsp-input { border-color: var(--b500, #10b981); background: var(--b50); font-weight: 700; padding-inline-end: 120px; }
.nwsp-picker--np.is-chosen .nwsp-iconfield > svg { color: var(--b600); }

.nwsp-np-notify { border-top: 1px dashed var(--s200); padding-top: 20px; margin-top: 22px; }
.nwsp-np-notify__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.nwsp-np-notify__h h3 { font-size: calc(13px * var(--fs, 1)); font-weight: 800; display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.nwsp-np-notify__h h3 svg { color: var(--b600); }
.nwsp-np-notify .nwsp-grid2 { gap: 14px; }
.nwsp-np-notify .nwsp-notify { background: var(--surface, #fff); margin: 0; align-items: flex-start; }
.nwsp-np-notify .nwsp-notify:has(input:checked) { border-color: var(--b500, #10b981); box-shadow: 0 0 0 1px var(--b500, #10b981) inset; background: var(--b50); }
.nwsp-np-notify .nwsp-notify.is-off { background: var(--s50, #f8fafc); }

/* customer profile card */
.nwsp-pid { display: flex; align-items: center; gap: 14px; }
.nwsp-pid > div { display: flex; flex-direction: column; min-width: 0; }
.nwsp-pid strong { font-size: calc(15px * var(--fs, 1)); font-weight: 800; }
.nwsp-pid small { color: var(--s500); font-size: calc(11px * var(--fs, 1)); overflow-wrap: anywhere; }
.nwsp-avatar { width: 54px; height: 54px; flex: none; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--b500, #10b981), var(--b700, #047857)); font-size: calc(15px * var(--fs, 1)); }
.nwsp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; }
.nwsp-stat { border: 1px solid var(--s200); background: var(--s50, #f8fafc); border-radius: 14px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.nwsp-stat small { color: var(--s500); font-size: calc(11px * var(--fs, 1)); }
.nwsp-stat b { font-size: calc(13px * var(--fs, 1)); font-weight: 800; }
.nwsp-prows { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--s100); padding-top: 14px; }
.nwsp-prow { display: flex; justify-content: space-between; gap: 10px; font-size: calc(12px * var(--fs, 1)); color: var(--s500); }
.nwsp-prow b { color: var(--s800, #1e293b); font-weight: 700; }
.nwsp-btn--block { display: flex; width: 100%; justify-content: center; }

/* dark tips card */
.nwsp-tips-dark { background: #111c2f; color: #e2e8f0; border-radius: 20px; padding: 20px 22px; }
.nwsp-tips-dark h3 { display: flex; align-items: center; gap: 8px; font-size: calc(14px * var(--fs, 1)); font-weight: 800; margin: 0 0 12px; color: #fff; }
.nwsp-tips-dark h3 svg { color: #34d399; }
.nwsp-tips-dark ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.nwsp-tips-dark li { position: relative; padding-inline-start: 16px; font-size: calc(12px * var(--fs, 1)); line-height: 2; color: #cbd5e1; }
.nwsp-tips-dark li::before { content: ''; position: absolute; inset-inline-start: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: #34d399; }
@media (max-width: 640px) { .nwsp-newpage--admin .nwsp-np-main { padding: 4px 16px 20px; } }

/* link popover next to the selected text in the editor */
.nwsp-linkpop { position: fixed; z-index: 100000; width: min(340px, calc(100vw - 16px)); background: var(--surface, #fff); border: 1px solid var(--s200); border-radius: 16px; box-shadow: 0 18px 44px rgba(15, 23, 42, .18); padding: 14px; display: flex; flex-direction: column; gap: 10px; direction: rtl; font-family: inherit; }
.nwsp-linkpop::before { content: ''; position: absolute; top: -6px; left: 50%; width: 11px; height: 11px; background: inherit; border-top: 1px solid var(--s200); border-left: 1px solid var(--s200); transform: translateX(-50%) rotate(45deg); }
.nwsp-linkpop__l { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s700); }
.nwsp-linkpop__l svg { color: var(--b600); }
.nwsp-linkpop .nwsp-input { border-radius: 12px; min-height: 42px; }
.nwsp-linkpop__err { margin: 0; font-size: calc(11px * var(--fs, 1)); color: var(--rose-700); }
.nwsp-linkpop__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.nwsp-linkpop__btns .nwsp-btn { flex: 1; min-width: 70px; }
.nwsp-dp-agentchk .nwsp-dp-ws { margin-inline-start: 8px; padding: 2px 6px; font-size: calc(11.5px * var(--fs, 1)); border: 1px solid var(--s200, #e2e8f0); border-radius: 8px; background: #fff; min-height: 0; }
.nwsp-dp-agentchk .nwsp-dp-ws-fixed { margin-inline-start: 8px; color: var(--s500, #64748b); }
/* Agent account switcher: rendered outside .nwsp-root (no design tokens there), so colors are literal and specific enough to beat theme link styles */
.nwsp-acct-switch { display: inline-flex; gap: 4px; flex-wrap: wrap; margin: 0 0 14px; padding: 4px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 14px; font-family: 'IRANSans', Tahoma, -apple-system, 'Segoe UI', sans-serif; }
.nwsp-acct-switch a.nwsp-btn { padding: 8px 18px; border: 1px solid transparent !important; border-radius: 10px; font-size: 13px; font-weight: 700; line-height: 1.5; text-decoration: none !important; box-shadow: none; outline: 0; }
.nwsp-acct-switch a.nwsp-btn--primary, .nwsp-acct-switch a.nwsp-btn--primary:hover, .nwsp-acct-switch a.nwsp-btn--primary:focus { background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; color: #fff !important; box-shadow: 0 4px 12px rgba(5, 150, 105, .25); }
.nwsp-acct-switch a.nwsp-btn--soft { background: transparent !important; color: #475569 !important; }
.nwsp-acct-switch a.nwsp-btn--soft:hover, .nwsp-acct-switch a.nwsp-btn--soft:focus { background: #fff !important; color: #047857 !important; }

/* ---- Ticket page as a chat (look of the approved HTML mockup): slim white header, plain chat bubbles, drawer file panel, reply bar ---- */
.nwsp-chatpage { --cb50: #eef2ff; --cb100: #e0e7ff; --cb500: #6366f1; --cb600: #4f46e5; --cb700: #4338ca; gap: 0; }
.nwsp-chatpage .nwsp-threadhead { border-radius: 16px 16px 0 0; box-shadow: none; margin: 0; padding: 12px 18px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.nwsp-chatpage .nwsp-th__row { flex: 1 1 auto; min-width: 0; gap: 12px; flex-wrap: nowrap; }
.nwsp-chatpage .nwsp-th__back { flex-shrink: 0; }
.nwsp-th__av { width: 40px; height: 40px; border-radius: 50%; background: var(--cb500, #6366f1); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: calc(14px * var(--fs, 1)); flex-shrink: 0; box-shadow: 0 2px 6px rgba(99, 102, 241, .35); }
.nwsp-th__main { min-width: 0; }
.nwsp-th__line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.nwsp-chatpage .nwsp-th__row h2 { font-size: calc(15px * var(--fs, 1)); font-weight: 800; color: var(--s800); }
.nwsp-chatpage .nwsp-th__id { background: none; color: inherit; padding: 0; font-size: inherit; font-weight: 800; }
.nwsp-chatpage .nwsp-th__meta { font-size: calc(11px * var(--fs, 1)); gap: 8px; margin-top: 2px; }
.nwsp-chatpage .nwsp-tags { display: none; }
.nwsp-chatpage .nwsp-threadhead__act { flex-shrink: 0; flex-wrap: wrap; gap: 8px; }
.nwsp-chatpage .nwsp-threadhead__act .nwsp-btn { background: var(--s100) !important; border: 1px solid var(--s200); color: var(--s700) !important; border-radius: 12px; padding: 7px 14px; font-size: calc(12px * var(--fs, 1)); font-weight: 500; box-shadow: none; }
.nwsp-chatpage .nwsp-threadhead__act .nwsp-btn:hover { background: var(--s200) !important; }
.nwsp-chatpage .nwsp-threadhead__act .nwsp-btn--danger:hover { background: #fff1f2 !important; border-color: #fecdd3; color: #e11d48 !important; }
.nwsp-chatpage .nwsp-sidebtn[aria-pressed=true] { background: var(--cb50) !important; border-color: var(--cb100); color: var(--cb700) !important; }

/* chat area + drawer in one frame */
.nwsp-chatcols { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--s200); border-top: 0; border-radius: 0 0 16px 16px; overflow: hidden; background: #fff; min-height: 70vh; }
.nwsp-chatcol { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background: rgba(248, 250, 252, .6); }
.nwsp-chatcols > .nwsp-side { flex: 0 0 320px; width: 320px; background: #fff; border-inline-start: 1px solid var(--s200); padding: 0; margin: 0; }
.nwsp-chatcols.is-side-closed > .nwsp-side { display: none; }
.nwsp-chatpage .nwsp-msgs { flex: 1 1 auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 20px; }
.nwsp-chatpage .nwsp-msgs > * + * { margin-top: 0; }

/* messages: avatar + name/time line above a plain bubble */
.nwsp-chatpage .nwsp-msg { display: flex; align-items: flex-start; gap: 10px; max-width: 36rem; width: auto; padding: 0; border: 0; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
.nwsp-chatpage .nwsp-msgs > .nwsp-msg { max-width: 36rem; }
.nwsp-chatpage .nwsp-msg--customer { align-self: flex-start; }
.nwsp-chatpage .nwsp-msg--agent, .nwsp-chatpage .nwsp-msg--ai, .nwsp-chatpage .nwsp-msg--note { align-self: flex-end; flex-direction: row-reverse; }
.nwsp-chatpage .nwsp-msg--system { align-self: stretch; max-width: none; display: block; }
.nwsp-chatpage .nwsp-msg__main { min-width: 0; }
.nwsp-chatpage .nwsp-msg--agent .nwsp-msg__main, .nwsp-chatpage .nwsp-msg--ai .nwsp-msg__main, .nwsp-chatpage .nwsp-msg--note .nwsp-msg__main { display: flex; flex-direction: column; align-items: flex-end; }
.nwsp-chatpage .nwsp-msg__head { display: flex; align-items: center; gap: 8px; padding: 0; margin: 0 0 4px; border: 0; background: none !important; }
.nwsp-chatpage .nwsp-msg--agent .nwsp-msg__head, .nwsp-chatpage .nwsp-msg--ai .nwsp-msg__head, .nwsp-chatpage .nwsp-msg--note .nwsp-msg__head { flex-direction: row-reverse; }
.nwsp-chatpage .nwsp-msg__who { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nwsp-chatpage .nwsp-msg__name { font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--s700); }
.nwsp-chatpage .nwsp-msg__time { font-size: calc(10px * var(--fs, 1)); color: var(--s400); gap: 4px; }
.nwsp-chatpage .nwsp-role, .nwsp-chatpage .nwsp-badge-ai, .nwsp-chatpage .nwsp-badge-note { font-size: calc(10px * var(--fs, 1)); }
.nwsp-chatpage .nwsp-msg .nwsp-body, .nwsp-chatpage .nwsp-msg--typing .nwsp-body { padding: 14px; font-size: calc(13px * var(--fs, 1)); line-height: 1.8; border-radius: 16px; border: 1px solid var(--s200); background: #fff; color: var(--s700); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); max-width: 100%; }
.nwsp-chatpage .nwsp-msg--customer .nwsp-body { border-start-start-radius: 0; }
.nwsp-chatpage .nwsp-msg--agent .nwsp-body, .nwsp-chatpage .nwsp-msg--ai .nwsp-body, .nwsp-chatpage .nwsp-msg--note .nwsp-body { border-start-end-radius: 0; text-align: start; }
.nwsp-chatpage .nwsp-msg--agent .nwsp-body { background: var(--cb600); border-color: var(--cb600); color: #fff; }
.nwsp-chatpage .nwsp-msg--agent .nwsp-body a, .nwsp-chatpage .nwsp-msg--agent .nwsp-body blockquote { color: #e0e7ff; }
.nwsp-chatpage .nwsp-msg--agent .nwsp-body blockquote { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); }
.nwsp-chatpage .nwsp-msg--agent .nwsp-msg__name { color: var(--cb600); }
.nwsp-chatpage .nwsp-msg--ai .nwsp-body { background: rgba(250, 245, 255, .85); border-color: #e9d5ff; }
.nwsp-chatpage .nwsp-msg--ai .nwsp-msg__name { background: linear-gradient(135deg, #6366f1, #a855f7 50%, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nwsp-chatpage .nwsp-msg--note .nwsp-body { background: rgba(254, 243, 199, .9); border-color: #fde68a; color: #78350f; }
.nwsp-chatpage .nwsp-msg--note .nwsp-msg__name { color: #92400e; }
.nwsp-chatpage .nwsp-msg__main > .nwsp-atts { margin: 6px 0 0; padding: 0; border: 0; }
.nwsp-chatpage .nwsp-av { width: 32px; height: 32px; border-radius: 50%; margin-top: 2px; font-size: calc(12px * var(--fs, 1)); box-shadow: 0 1px 3px rgba(15, 23, 42, .15); }
.nwsp-chatpage .nwsp-av svg { width: 16px; height: 16px; }
.nwsp-chatpage .nwsp-av--customer { background: #0d8abc; color: #fff; }
.nwsp-chatpage .nwsp-av--agent { background: var(--cb600); color: #fff; }
.nwsp-chatpage .nwsp-av--note { background: #f59e0b; color: #fff; }

/* reply bar */
.nwsp-replydock { position: sticky; bottom: 0; z-index: 5; padding: 0; background: #fff; border-top: 1px solid var(--s200); box-shadow: 0 -4px 14px rgba(15, 23, 42, .06); }
.nwsp-replydock .nwsp-reply, .nwsp-replydock .nwsp-closednote, .nwsp-replydock .nwsp-aidec { border: 0; border-radius: 0; box-shadow: none; margin: 0; background: transparent; }
.nwsp-chatpage .nwsp-reply { padding: 12px 16px; overflow: visible; }
.nwsp-chatpage .nwsp-reply > * + * { margin-top: 10px; }
.nwsp-reply__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.nwsp-chatpage .nwsp-reply__tabs { padding: 0; border: 0; gap: 8px; }
.nwsp-chatpage .nwsp-reply__tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--s200); border-radius: 12px; background: #fff !important; color: var(--s500); font-size: calc(12px * var(--fs, 1)); font-weight: 500; }
.nwsp-chatpage .nwsp-reply__tabs button::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--s300); background: #fff; flex-shrink: 0; box-sizing: border-box; }
.nwsp-chatpage .nwsp-reply__tabs button.is-active { background: var(--cb50) !important; border-color: var(--cb100); color: var(--cb600); }
.nwsp-chatpage .nwsp-reply__tabs button.is-active::before { border: 4px solid var(--cb600); }
.nwsp-chatpage .nwsp-reply__tabs button.note { color: #b45309; }
.nwsp-chatpage .nwsp-reply__tabs button.note.is-active { background: #fffbeb !important; border-color: #fde68a; color: #b45309; }
.nwsp-chatpage .nwsp-reply__tabs button.note.is-active::before { border-color: #d97706; }
.nwsp-chatpage .nwsp-reply .nwsp-aibar { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nwsp-chatpage .nwsp-reply .nwsp-aibar .nwsp-btn { background: #faf5ff !important; border: 1px solid #f3e8ff; color: #9333ea !important; border-radius: 12px; font-weight: 500; }
.nwsp-reply__box { display: flex; align-items: flex-end; gap: 8px; background: var(--s50); border: 1px solid var(--s200); border-radius: 16px; padding: 8px; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.nwsp-reply__box:focus-within { border-color: var(--cb500); box-shadow: 0 0 0 2px rgba(99, 102, 241, .2); }
.nwsp-reply__box.is-note { background: rgba(255, 251, 235, .7); border-color: #fcd34d; }
.nwsp-reply__attach { display: inline-flex; padding: 8px; border-radius: 12px; color: var(--s400); cursor: pointer; flex-shrink: 0; }
.nwsp-reply__attach:hover { background: rgba(226, 232, 240, .6); color: var(--s600); }
.nwsp-reply__attach svg { width: 20px; height: 20px; }
.nwsp-reply__ed { flex: 1 1 auto; min-width: 0; }
.nwsp-reply__box .nwsp-editor { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.nwsp-reply__box .nwsp-editor__bar { display: none; background: transparent; padding: 0 0 6px; }
.nwsp-reply__box .nwsp-editor:focus-within .nwsp-editor__bar { display: flex; }
.nwsp-reply__box .nwsp-editor__area { min-height: 40px; max-height: 220px; padding: 8px 4px; background: transparent; font-size: calc(13px * var(--fs, 1)); }
.nwsp-chatpage .nwsp-reply [data-act=send] { background: var(--cb600) !important; border-color: var(--cb600); color: #fff !important; border-radius: 12px; padding: 10px 20px; font-size: calc(12px * var(--fs, 1)); font-weight: 500; box-shadow: 0 4px 10px rgba(79, 70, 229, .3); flex-shrink: 0; }
.nwsp-chatpage .nwsp-reply [data-act=send]:hover { background: var(--cb700) !important; }
.nwsp-chatpage .nwsp-reply__foot { padding: 0; border: 0; background: none; }
.nwsp-chatpage .nwsp-reply .nwsp-canned { margin-inline-start: 0; background-color: #fff; border-color: var(--s200); color: var(--s600); }

/* the side panel: flat sections like the mockup */
.nwsp-side__bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--s100); font-size: calc(12px * var(--fs, 1)); color: var(--s700); }
.nwsp-side__bar button { border: 0; background: transparent; color: var(--s400); padding: 4px; border-radius: 8px; cursor: pointer; display: inline-flex; }
.nwsp-side__bar button:hover { background: var(--s100); color: var(--s600); }
.nwsp-chatcols > .nwsp-side > :not(.nwsp-side__bar) { margin: 16px 16px 0; }
.nwsp-chatcols > .nwsp-side > :last-child { margin-bottom: 16px; }
.nwsp-side__hero { background: var(--s50); border: 1px solid var(--s100); border-radius: 16px; padding: 14px; text-align: center; }
.nwsp-side__av { width: 64px; height: 64px; border-radius: 50%; background: #0d8abc; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: calc(22px * var(--fs, 1)); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, .15); }
.nwsp-side__hero h4 { margin: 8px 0 0; font-size: calc(14px * var(--fs, 1)); font-weight: 800; color: var(--s800); }
.nwsp-side__hero p { margin: 2px 0 0; font-size: calc(11px * var(--fs, 1)); color: var(--s400); }
.nwsp-chatcols > .nwsp-side .nwsp-card { box-shadow: none; background: var(--s50); border: 1px solid var(--s100); border-radius: 16px; padding: 12px; }
.nwsp-chatcols > .nwsp-side .nwsp-panel__head { color: var(--s400); font-size: calc(10px * var(--fs, 1)); font-weight: 700; margin-bottom: 8px; }
.nwsp-chatcols > .nwsp-side .nwsp-panel .nwsp-kv { background: transparent; padding: 4px 0; margin: 0; }

@media (max-width: 1023px) {
	.nwsp-chatcols { min-height: 60vh; }
	.nwsp-chatcols > .nwsp-side { position: fixed; inset-block: 0; inset-inline-end: 0; width: min(340px, 90vw); flex: none; z-index: 100000; overflow-y: auto; box-shadow: 0 0 40px rgba(15, 23, 42, .35); border-inline-start: 0; }
	.nwsp-chatpage .nwsp-msgs { padding: 14px; }
	.nwsp-chatpage .nwsp-threadhead .nwsp-threadhead__act .nwsp-btn span { display: none; }
	.nwsp-chatpage .nwsp-reply [data-act=send] span { display: none; }
}

/* ticket list: the SLA text stays on one line (the table scrolls sideways instead of breaking it letter by letter) */
.nwsp-tablewrap .nwsp-sla { white-space: nowrap; }

/* AI "typing" line while it answers a new ticket: a small pill under the customer's message, like an AI chat */
.nwsp-chatpage .nwsp-msg--typing .nwsp-typing { padding: 8px 16px; gap: 10px; border-radius: 999px; border: 1px solid var(--s200); background: #fff; }
.nwsp-chatpage .nwsp-msg--typing .nwsp-typing__t { font-size: calc(12px * var(--fs, 1)); font-weight: 500; color: var(--s500); }
.nwsp-chatpage .nwsp-msg--typing .nwsp-typing__dots i { background: var(--cb600); }
.nwsp-chatpage .nwsp-msg--typing { align-items: center; }
.nwsp-replydock:has(.nwsp-msg--typing) { background: transparent; border: 0; box-shadow: none; padding: 0 24px 20px; }

/* under an AI answer: "was it solved?" bar (then the reply box when the AI may answer again) */
.nwsp-aidec--bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 12px 16px; }
.nwsp-aidec__q { display: inline-flex; align-items: center; gap: 8px; font-size: calc(12px * var(--fs, 1)); color: var(--s600); }
.nwsp-aidec__q svg { width: 18px; height: 18px; color: #6366f1; }
.nwsp-aidec--bar .nwsp-aidec__btns { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.nwsp-replydock .nwsp-aidec--bar { background: var(--s50); border-bottom: 1px solid var(--s200); }

/* typing line now sits in the message list; the reply box below it is switched off while the AI answers */
.nwsp-replydock:has(.nwsp-msg--typing) { padding: 0; background: #fff; border-top: 1px solid var(--s200); box-shadow: 0 -4px 14px rgba(15, 23, 42, .06); }
.nwsp-reply__box.is-off { opacity: .6; }
.nwsp-reply__off { width: 100%; border: 0; background: transparent; resize: none; outline: 0; font: inherit; font-size: calc(13px * var(--fs, 1)); padding: 8px 4px; min-height: 56px; }
.nwsp-reply__box.is-off .nwsp-btn { opacity: .6; cursor: not-allowed; }

/* FAQ step: search + category groups */
.nwsp-faq__tools { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.nwsp-faq__tools .nwsp-input { flex: 1; min-width: 180px; }
.nwsp-faq__cat { margin: 10px 2px 2px; font-size: calc(13px * var(--fs, 1)); color: var(--s500, #64748b); font-weight: 800; }
.nwsp-faq__cat:first-child { margin-top: 0; }
.nwsp-faq__none { text-align: center; color: var(--s500, #64748b); padding: 12px; }
/* FAQ admin: visibility switch, status card, selection checkbox */
.nwsp-kbp-sw { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit; font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: #64748b; }
.nwsp-kbp-sw i { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #cbd5e1; transition: background .2s; flex: none; }
.nwsp-kbp-sw i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; }
.nwsp-kbp-sw.is-on { color: var(--b700, #047857); }
.nwsp-kbp-sw.is-on i { background: var(--b600, #059669); }
.nwsp-kbp-sw.is-on i::after { inset-inline-start: 19px; }
.nwsp-kbp-pick { display: inline-flex; align-items: center; gap: 6px; color: #64748b; font-size: calc(12px * var(--fs, 1)); cursor: pointer; }
.nwsp-kbp-status { margin-bottom: 16px; padding: 20px 24px !important; border-inline-start: 4px solid #f59e0b; }
.nwsp-kbp-status.is-ok { border-inline-start-color: var(--b600, #059669); }
.nwsp-kbp-status h2 { margin: 0 0 14px; padding: 0; font-size: calc(15px * var(--fs, 1)); }
.nwsp-kbp-status ul { margin: 0; padding: 0 !important; list-style: none; display: grid; gap: 6px; }
.nwsp-kbp-status li { padding: 2px 0; line-height: 1.9; }
.nwsp-kbp-status li.ok { color: var(--b700, #047857); }
.nwsp-kbp-status li.no { color: #b45309; }
.nwsp-kbp-status li small { display: block; color: #64748b; margin-inline-start: 18px; }
.nwsp-kbp-all-modes { margin-inline-start: 8px; font-weight: 400; }
.nwsp-kbp-bulkdel:disabled { opacity: .45; cursor: not-allowed; }
/* FAQ step: department select was clipping its text (line-height inherited from createform) */
.nwsp-faq .nwsp-select, .nwsp-createform .nwsp-faq .nwsp-select { line-height: 1.6 !important; height: auto !important; min-height: 48px; padding-top: 10px !important; padding-bottom: 10px !important; font-size: calc(13px * var(--fs, 1)); overflow: visible; text-overflow: ellipsis; }

/* FAQ step: chevron that shows the question can be opened */
.nwsp-faq__item > summary { position: relative; display: block; padding-inline-end: 52px; }
.nwsp-faq__item > summary::after { content: ""; position: absolute; inset-inline-end: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-inline-end: 2px solid var(--s400, #94a3b8); border-bottom: 2px solid var(--s400, #94a3b8); transform: rotate(45deg); transition: transform .2s, border-color .2s; }
.nwsp-faq__item > summary:hover::after { border-color: var(--b600, #059669); }
.nwsp-faq__item[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; border-color: var(--b600, #059669); }
.nwsp-faq__item > summary:hover { background: var(--s50, #f8fafc); border-radius: 14px; }

/* SMS settings: NirSMS promo notice */
.nwsp-sms-promo { background: #f57420; color: #fff; border-radius: 16px; padding: 18px 22px; margin-bottom: 16px; box-shadow: 0 8px 24px rgba(245, 116, 32, .2); }
.nwsp-sms-promo b { display: block; font-size: calc(15px * var(--fs, 1)); margin-bottom: 6px; }
.nwsp-sms-promo p { margin: 0; line-height: 2; font-size: calc(13px * var(--fs, 1)); color: #fff; }
.nwsp-sms-promo a { color: #fff; font-weight: 800; text-decoration: underline; }

/* SMS pattern variables field: the [hidden] attribute lost to display:flex in wp-admin, so it never hid for IPPanel / Faraz / sms.ir / NirSMS */
.nwsp-nev__lbl[hidden], .nwsp-nev__slots[hidden], .nwsp-nev__map[hidden], [data-vars-lbl][hidden] { display: none !important; }
