
  /* Users page */
  .filters-bar { display: flex; min-width:0; gap: 8px; flex-wrap: nowrap; align-items: center; }
  .users-participant-search { width:min(360px,30vw); min-width:220px; min-height:36px; flex:0 1 360px; padding:8px 11px; border:1px solid var(--crm-border,#dedfe5); border-radius:var(--crm-control-radius,9px); outline:0; background:var(--crm-surface,#fff); color:var(--crm-text,#303541); font:inherit; font-size:11px; }
  .users-participant-search:focus { border-color:var(--crm-accent,#43b7a8); box-shadow:var(--crm-focus-ring,0 0 0 3px rgba(67,183,168,.14)); }
  .users-participant-search::placeholder { color:var(--crm-text-muted,#89919c); }
  .filter-btn { display:inline-flex; min-height:36px; flex:0 0 auto; align-items:center; justify-content:center; padding:8px 12px; border-radius: 8px; border: 1px solid #e5e5e5; background: #fff; font-size: 12px; color: #666; cursor: pointer; font-weight: 500; white-space:nowrap; }
  .filter-btn:hover { border-color: #ccc; }
  .filter-btn.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
  .users-product-filters-scroll { min-width:0; flex:1 1 auto; overflow-x:auto; overflow-y:hidden; padding:1px 0 4px; scrollbar-width:thin; scrollbar-color:#c9cdd4 transparent; overscroll-behavior-inline:contain; }
  .users-product-filter-strip,.users-product-filter-list { display:flex; width:max-content; align-items:center; gap:8px; }
  .users-product-filter-item { position:relative; display:flex; flex:0 0 auto; align-items:center; border-radius:8px; }
  .users-product-filter-item[hidden] { display:none; }
  .users-product-filter-button { max-width:260px; overflow:hidden; text-overflow:ellipsis; }
  .users-product-filter-eye { position:absolute; top:50%; right:5px; display:none; width:26px; height:26px; align-items:center; justify-content:center; padding:0; border:1px solid transparent; border-radius:6px; background:transparent; color:#7f8793; cursor:pointer; transform:translateY(-50%); }
  .users-product-filter-eye svg { display:block; width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  .users-product-filter-eye:hover { border-color:#d7d9df; background:#f4f5f7; color:#219b8e; }
  .users-product-filter-strip.is-editing .users-product-filter-item { cursor:grab; }
  .users-product-filter-strip.is-editing .users-product-filter-button { padding-right:38px; cursor:grab; }
  .users-product-filter-strip.is-editing .users-product-filter-eye { display:inline-flex; }
  .users-product-filter-item.is-hidden { opacity:.43; filter:saturate(.2); }
  .users-product-filter-item.is-dragging { opacity:.32; }
  .users-product-filter-item.is-drag-target { box-shadow:0 0 0 2px rgba(67,183,168,.48); }
  html[data-theme="dark"] .users-product-filters-scroll { scrollbar-color:#3a3e48 transparent; }
  html[data-theme="dark"] .users-product-filter-eye:hover { border-color:#343741; background:#242730; color:#68cfc1; }
  .users-table-toolbar { display:flex; flex:0 0 auto; align-items:center; justify-content:flex-end; gap:7px; margin-left:0; }
  .users-table-toolbar .export-button { width:36px; height:36px; min-height:36px; flex:0 0 36px; border-radius:9px; }
  .table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .table th { text-align: left; padding: 8px 0; color: #999; font-weight: 500; border-bottom: 1px solid #e5e5e5; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
  .table td { padding: 12px 0; border-bottom: 1px solid #e5e5e5; vertical-align: middle; }
  .table tr:last-child td { border-bottom: none; }
  .user-cell { display: flex; align-items: center; gap: 10px; }
  .user-avatar { width: 32px; height: 32px; border-radius: 50%; background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #666; }
  .user-message-button { width: 34px; height: 34px; flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dedfe5; border-radius: 9px; background: #f6f7f9; color: #219b8e; font-size: 17px; line-height: 1; cursor: pointer; transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease; }
  .user-message-button:hover { border-color: #43b7a8; background: rgba(67,183,168,.13); color: #16877b; transform: translateY(-1px); }
  .user-message-button:focus-visible { outline: 2px solid rgba(67,183,168,.42); outline-offset: 2px; }
  .user-name { font-weight: 500; }
  .user-contact { font-size: 11px; color: #999; }
  .tag { display: inline-flex; padding: 3px 8px; border-radius: 5px; font-size: 11px; font-weight: 500; }
  .tag-green { background: #e8f5e9; color: #27ae60; }
  .tag-amber { background: #fff8e1; color: #f39c12; }
  .tag-blue { background: #e3f2fd; color: #2980b9; }
  .progress-bar { width: 80px; height: 5px; border-radius: 3px; background: #f0f0f0; overflow: hidden; }
  .progress-fill { height: 100%; border-radius: 3px; }
  .subscription-progress-na { color: #8e44ad; font-size: 11px; font-weight: 650; }
  .users-overview { min-width: 0; }
  .users-kpi-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: 1fr; gap: 12px; }
  .users-goal-pair { width: 100%; }
  .users-goal-pair.active { border-color: color-mix(in srgb, var(--goal-color) 68%, #d9dbe2); border-left-color: var(--goal-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--goal-color) 18%, transparent), 0 10px 28px color-mix(in srgb, var(--goal-color) 12%, transparent); }
  .users-goal-pair .user-tab-share { margin-top: -1px; }
  .users-message-dialog { width: min(480px,calc(100vw - 32px)); padding: 0; border: 1px solid #dedfe5; border-radius: 12px; background: #fff; color: #1a1a1a; box-shadow: 0 20px 60px rgba(22,26,34,.24); }
  .users-message-dialog::backdrop { background: rgba(12,14,18,.5); backdrop-filter: blur(2px); }
  .users-message-dialog-content { padding: 18px; }
  .users-message-action { min-height: 39px; padding: 9px 12px; border: 1px solid #dedfe5; border-radius: 9px; background: #fff; color: #555; font-size: 11px; font-weight: 650; cursor: pointer; }
  .users-message-action:hover { border-color: #43b7a8; color: #219b8e; }
  .users-message-action.primary { border-color: #219b8e; background: #219b8e; color: #fff; }
  .users-message-action.primary:hover { background: #1b887e; color: #fff; }
  .users-message-action:disabled { opacity: .48; cursor: not-allowed; }
  .users-message-form { display: none; }
  .users-message-form.open { display: block; }
  .users-message-form-title { font-size: 12px; font-weight: 700; }
  .users-message-text { width: 100%; min-height: 64px; margin-top: 8px; padding: 9px 10px; resize: vertical; border: 1px solid #dedfe5; border-radius: 8px; background: #fff; color: #1a1a1a; font: inherit; font-size: 11px; outline: none; }
  .users-message-text:focus { border-color: #43b7a8; }
  .users-message-schedule { display: none; grid-template-columns: 1fr 105px; gap: 8px; margin-top: 8px; }
  .users-message-schedule.visible { display: grid; }
  .users-message-schedule select,
  .users-message-schedule input { min-width: 0; padding: 7px 8px; border: 1px solid #dedfe5; border-radius: 8px; background: #fff; color: #555; font: inherit; font-size: 10px; }
  .users-message-form-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
  .users-message-form-status { color: #27ae60; font-size: 10px; font-weight: 600; }
  .users-table-panel { padding: 0; overflow: hidden; }
  .users-table-scroll { overflow-x: auto; }
  .users-table { min-width: 1080px; padding: 0 18px; display: table; table-layout: fixed; }
  .users-table th { vertical-align: top; }
  .users-table tbody tr[data-user-course] { cursor: pointer; }
  .users-table tbody tr[data-user-course] td { transition: background-color .16s ease, box-shadow .16s ease; }
  .users-table tbody tr[data-user-course]:hover td,
  .users-table tbody tr[data-user-course]:focus-visible td { background: rgba(67,183,168,.09); box-shadow: inset 0 1px rgba(67,183,168,.16), inset 0 -1px rgba(67,183,168,.16); }
  .users-table tbody tr[data-user-course]:focus-visible { outline: 2px solid rgba(67,183,168,.45); outline-offset: -2px; }
  html[data-theme="dark"] .users-table tbody tr[data-user-course]:hover td,
  html[data-theme="dark"] .users-table tbody tr[data-user-course]:focus-visible td { background: rgba(67,183,168,.13); box-shadow: inset 0 1px rgba(104,207,193,.2), inset 0 -1px rgba(104,207,193,.2); }
  .users-th { position: relative; padding-right: 10px; }
  .users-th-row { display: flex; align-items: center; gap: 4px; min-height: 24px; }
  .users-column-eye { display:none; width:24px; height:24px; flex:0 0 auto; align-items:center; justify-content:center; padding:0; border:1px solid transparent; border-radius:6px; background:transparent; color:#7f8793; cursor:pointer; }
  .users-column-eye svg { display:block; width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  .users-column-eye:hover { border-color:#d7d9df; background:#f4f5f7; color:#219b8e; }
  .users-column-eye.is-hidden { color:#aeb3bc; }
  html[data-theme="dark"] .users-column-eye:hover { border-color:#343741; background:#242730; color:#68cfc1; }
  .users-table.is-editing-columns .users-column-eye { display:inline-flex; }
  .users-table:not(.is-editing-columns) [data-users-column-hidden="1"] { display:none; }
  .users-table.is-editing-columns [data-users-column-hidden="1"] { opacity:.43; filter:saturate(.18); background:#eff1f4; }
  .users-table.is-editing-columns th[data-users-column-hidden="1"] { background:#e8ebef; }
  html[data-theme="dark"] .users-table.is-editing-columns [data-users-column-hidden="1"] { background:#1c1f25; }
  html[data-theme="dark"] .users-table.is-editing-columns th[data-users-column-hidden="1"] { background:#181b20; }
  .users-th-label-button { display: inline-flex; min-width: 0; flex: 1; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: inherit; font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap; cursor: grab; user-select: none; }
  .users-th-label-button:active { cursor: grabbing; }
  .users-table th.users-column-dragging { opacity: .48; }
  .users-table th.users-column-drag-target { background: rgba(67,183,168,.08); }
  .users-column-resizer { position: absolute; z-index: 4; top: -9px; right: -5px; bottom: -9px; width: 10px; cursor: col-resize; touch-action: none; }
  .users-column-resizer::after { content: ""; position: absolute; top: 7px; bottom: 7px; left: 4px; width: 1px; border-radius: 2px; background: transparent; transition: background .15s ease,box-shadow .15s ease; }
  .users-column-resizer:hover::after,
  body.users-column-resizing .users-column-resizer.active::after { background: #43b7a8; box-shadow: 0 0 0 2px rgba(67,183,168,.14); }
  body.users-column-resizing { cursor: col-resize; user-select: none; }
  .users-th-label-button:hover,
  .users-th-label-button.active { border-color: #d7d9df; background: #f4f5f7; color: #1a1a1a; }
  .users-th-filter-badge { display: none; min-width: 16px; height: 16px; align-items: center; justify-content: center; padding: 0 4px; border-radius: 99px; background: #219b8e; color: #fff; font-size: 8px; font-weight: 750; letter-spacing: 0; }
  .users-th-label-button.active .users-th-filter-badge { display: inline-flex; }
  .users-th-action { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #999; font-size: 11px; cursor: pointer; }
  .users-th-action:hover,
  .users-th-action.active { border-color: #d7d9df; background: #f4f5f7; color: #1a1a1a; }
  /* Theme switch */
  :is(.theme-toggle,.pv-appearance-toggle) { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #e5e5e5; border-radius: 20px; background: #fff; cursor: pointer; user-select: none; }
  :is(.theme-toggle,.pv-appearance-toggle) input { position: absolute; opacity: 0; pointer-events: none; }
  .theme-symbol { color: #999; font-size: 12px; line-height: 1; }
  .theme-track { position: relative; width: 36px; height: 20px; border-radius: 20px; background: #d7d9df; transition: background .2s ease; }
  .theme-thumb { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .2s ease; }
  :is(.theme-toggle,.pv-appearance-toggle) input:checked + .theme-track { background: #43b7a8; }
  :is(.theme-toggle,.pv-appearance-toggle) input:checked + .theme-track .theme-thumb { transform: translateX(16px); }
  :is(.theme-toggle,.pv-appearance-toggle):focus-within { outline: 2px solid rgba(67,183,168,.35); outline-offset: 2px; }
.users-audience-product-filter{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 12px;padding:12px 14px;border:1px solid #e1e5ea;border-radius:10px;background:#f8f9fa;color:#353c45}
.users-audience-product-filter>span{display:flex;min-width:0;flex-direction:column;gap:3px}
.users-audience-product-filter strong{font-size:12px}
.users-audience-product-filter small{color:#858d97;font-size:10px}
.users-audience-product-filter select{width:min(360px,48%);min-height:34px;padding:0 30px 0 10px;border:1px solid #d5dbe2;border-radius:8px;background:#fff;color:#3f4751;font:inherit;font-size:11px}
.audience-users-sentinel{width:100%;height:1px;pointer-events:none}
html[data-theme="dark"] .users-audience-product-filter{border-color:#30343d;background:#17191f;color:#e6e8ed}
html[data-theme="dark"] .users-audience-product-filter small{color:#858a95}
html[data-theme="dark"] .users-audience-product-filter select{border-color:#343945;background:#121419;color:#e6e8ed}
