    /* ─── Roles redesign: sidebar + single-panel ─────────── */
    .rl-wrap { display: flex; height: 600px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); box-shadow: var(--shadow-sm); }
    .rl-sidebar { width: 190px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; background: #FAFBFC; }
    .rl-sidebar-hdr { padding: 10px 14px 7px; font-size: 10px; font-weight: 700; color: var(--text-light); letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--border); }
    .rl-role-list { flex: 1; overflow-y: auto; padding: 4px 0; }
    .rl-role-item { position: relative; display: flex; align-items: center; gap: 4px; padding: 8px 9px 8px 12px; cursor: pointer; border-left: 3px solid transparent; transition: background var(--transition), border-color var(--transition); }
    .rl-role-item:hover { background: var(--teal-lt); }
    .rl-role-item.active { background: var(--orange-lt); border-left-color: var(--orange); }
    .rl-role-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rl-role-item.active .rl-role-name { color: var(--orange-dk); font-weight: 600; }
    .rl-role-actions { display: flex; gap: 1px; opacity: 0; transition: opacity .12s; flex-shrink: 0; }
    .rl-role-item:hover .rl-role-actions { opacity: 1; }
    .rl-icon-btn-sm { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 3px; border: none; background: transparent; cursor: pointer; color: var(--text-muted); padding: 0; transition: background .12s, color .12s; }
    .rl-icon-btn-sm:hover { background: rgba(0,0,0,.07); }
    .rl-icon-btn-sm.danger:hover { background: #FEE2E2; color: var(--danger); }
    .rl-icon-btn-sm svg { width: 11px; height: 11px; }
    .rl-sidebar-foot { padding: 9px 10px; border-top: 1px solid var(--border); }
    .rl-btn-new { display: flex; align-items: center; gap: 5px; width: 100%; height: 29px; padding: 0 9px; border-radius: var(--radius-sm); border: 1px dashed var(--border); background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 500; cursor: pointer; font-family: inherit; transition: background var(--transition), border-color var(--transition), color var(--transition); }
    .rl-btn-new:hover { background: var(--orange-lt); border-color: var(--orange); color: var(--orange-dk); }
    .rl-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
    .rl-topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--white); flex-shrink: 0; gap: 10px; }
    .rl-role-title { font-size: 14px; font-weight: 700; color: var(--text); }
    .rl-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--border); color: var(--text-muted); background: var(--bg); margin-left: 8px; }
    .rl-badge.warn { background: #FEF2F2; color: var(--danger); border-color: #FECACA; }
    .rl-scroll { flex: 1; overflow-y: auto; padding: 12px 16px 24px; }
    .rl-scroll::-webkit-scrollbar { width: 5px; }
    .rl-scroll::-webkit-scrollbar-track { background: transparent; }
    .rl-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
    .rl-section-div { display: flex; align-items: center; gap: 8px; margin-top: 18px; margin-bottom: 7px; }
    .rl-section-div:first-child { margin-top: 0; }
    .rl-section-lbl { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); white-space: nowrap; }
    .rl-section-line { flex: 1; height: 1px; background: var(--teal-lt); }
    .rl-section-count { font-size: 10px; color: var(--text-light); white-space: nowrap; }
    .rl-section.disabled-section { opacity: .38; pointer-events: none; }
    .rl-group { margin-bottom: 3px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
    .rl-group-hdr { display: flex; align-items: center; gap: 7px; padding: 7px 10px; background: #F8FAFC; cursor: pointer; user-select: none; transition: background var(--transition); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
    .rl-group-hdr:hover { background: var(--teal-lt); }
    .rl-group-chev { color: var(--text-light); transition: transform .16s; flex-shrink: 0; display: flex; }
    .rl-group.open .rl-group-chev { transform: rotate(90deg); }
    .rl-group-name { flex: 1; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
    .rl-check-all-lbl { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); cursor: pointer; padding: 2px 5px; border-radius: 3px; white-space: nowrap; }
    .rl-check-all-lbl:hover { background: rgba(0,0,0,.05); }
    .rl-group-body { display: none; }
    .rl-group.open .rl-group-body { display: block; }
    .rl-perm-row { display: flex; align-items: center; gap: 9px; padding: 7px 10px 7px 24px; border-top: 1px solid #F1F5F9; cursor: pointer; transition: background .1s; }
    .rl-perm-row:hover { background: #FAFBFF; }
    .rl-perm-lbl { font-size: 13px; color: var(--text); line-height: 1.5; flex: 1; }
    .rl-cb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border: 1.5px solid var(--border); border-radius: 3px; background: var(--white); cursor: pointer; flex-shrink: 0; position: relative; transition: border-color .12s, background .12s; }
    .rl-cb:checked { background: var(--orange); border-color: var(--orange); }
    .rl-cb:checked::after { content: ''; position: absolute; left: 2.5px; top: 0.5px; width: 4.5px; height: 7.5px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(40deg); }
    .rl-cb:disabled { opacity: .5; cursor: not-allowed; }
    .rl-cb:disabled:checked { background: var(--text-light); border-color: var(--text-light); }

    /* ─── Notification Templates Two-Column Layout ────── */
    .notif-two-col { display: grid; grid-template-columns: 300px 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--white); min-height: 460px; }
    .notif-list-col { border-right: 1px solid var(--border); overflow-y: auto; max-height: 520px; display: flex; flex-direction: column; }
    .notif-list-hdr { padding: 9px 14px; border-bottom: 2px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: #F8FAFC; flex-shrink: 0; }
    .notif-list-hdr-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
    .notif-list-row { display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid #F1F5F9; border-left: 3px solid transparent; transition: background .12s; }
    .notif-list-row:last-child { border-bottom: none; }
    .notif-list-row:hover { background: #F8FAFF; }
    .notif-list-row.active { background: #EBF1F4; border-left-color: var(--teal); }
    .notif-list-event-name { font-size: 13px; font-weight: 500; color: var(--text); flex: 1; }
    .notif-list-channels { display: flex; gap: 3px; flex-shrink: 0; }
    .notif-ch-dot { width: 18px; height: 18px; border-radius: 50%; font-size: 8px; font-weight: 800; display: flex; align-items: center; justify-content: center; color: #fff; }
    .notif-ch-dot.email  { background: #3B82F6; }
    .notif-ch-dot.sms    { background: #10B981; }
    .notif-ch-dot.mobile { background: #8B5CF6; }
    .notif-ch-dot.web-app{ background: #39758D; }
    .notif-ch-dot.browser{ background: #F59E0B; }
    /* ─── Edit Panel ────────────────────────────────── */
    .notif-edit-col { display: flex; flex-direction: column; overflow: hidden; }
    .notif-edit-panel-hdr { padding: 13px 18px; border-bottom: 1px solid var(--border); background: #FAFBFC; flex-shrink: 0; }
    .notif-edit-panel-title { font-size: 14px; font-weight: 700; color: var(--text); }
    .notif-edit-panel-hook { font-size: 10px; color: var(--text-muted); font-family: 'Courier New', monospace; margin-top: 2px; }
    .notif-ch-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); padding: 0 18px; background: #FAFBFC; flex-shrink: 0; overflow-x: auto; }
    .notif-ch-tab { display: flex; align-items: center; gap: 5px; padding: 9px 11px; font-size: 12px; font-weight: 500; color: var(--text-muted); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap; }
    .notif-ch-tab:hover { color: var(--teal); }
    .notif-ch-tab.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 600; }
    .notif-ch-tab .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
    .notif-ch-form { padding: 18px; flex: 1; overflow-y: auto; }
    .notif-ch-content { display: none; }
    .notif-ch-content.active { display: block; }
    .notif-ch-enable-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding: 10px 14px; background: #F8FAFC; border-radius: 8px; border: 1px solid var(--border); }
    .notif-ch-enable-label { font-size: 13px; font-weight: 600; color: var(--text); }
    .notif-field { margin-bottom: 12px; }
    .notif-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
    .notif-field label span.hint { font-weight: 400; color: var(--text-muted); }
    .notif-field input[type=text] { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; color: var(--text); outline: none; box-sizing: border-box; transition: border-color .15s; }
    .notif-field input[type=text]:focus { border-color: var(--teal); }
    .textarea-wrapper { position: relative; }
    .notif-field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; color: var(--text); outline: none; resize: vertical; font-family: inherit; min-height: 110px; box-sizing: border-box; transition: border-color .15s; }
    .notif-field textarea:focus { border-color: var(--teal); }
    .var-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
    .var-hint kbd { background: #F1F5F9; border: 1px solid var(--border); border-radius: 3px; padding: 1px 4px; font-size: 10px; font-family: monospace; }
    /* ─── Variable Picker Dropdown ─────────────────── */
    .var-picker { position: absolute; left: 0; background: var(--white); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.13); z-index: 200; min-width: 260px; max-height: 188px; overflow-y: auto; }
    .var-picker-header { padding: 5px 10px; font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid #F1F5F9; position: sticky; top: 0; background: #fff; }
    .var-picker-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; transition: background .1s; }
    .var-picker-item:hover, .var-picker-item.highlighted { background: #EBF1F4; }
    .var-picker-key { font-family: monospace; font-size: 12px; font-weight: 700; color: var(--teal); min-width: 80px; }
    .var-picker-desc { font-size: 11px; color: var(--text-muted); }
    /* ─── Variable Chips ────────────────────────────── */
    .var-chips-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
    .var-chip { font-family: monospace; font-size: 10px; font-weight: 700; color: var(--teal); background: #EBF1F4; border: 1px solid #C8DDE6; border-radius: 4px; padding: 2px 6px; cursor: pointer; transition: all .15s; }
    .var-chip:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
    /* ─── Notif Edit Footer ─────────────────────────── */
    .notif-edit-footer { padding: 12px 18px; border-top: 1px solid var(--border); background: #FAFBFC; flex-shrink: 0; }


    /* ─── Project Settings Modal ──────────────────────────── */
    .modal-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,.45); z-index: 200;
      align-items: center; justify-content: center;
    }
    .modal-overlay.open { display: flex; }
    .modal-box {
      background: var(--white); border-radius: var(--radius-lg);
      width: 65%; max-width: 900px; height: 80vh;
      display: flex; flex-direction: column;
      box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden;
    }
    .modal-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
    }
    .modal-header-title { font-size: 15px; font-weight: 700; color: var(--text); }
    .modal-header-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
    .modal-close {
      width: 30px; height: 30px; border: none; background: none; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      border-radius: var(--radius-sm); color: var(--text-muted);
      transition: background var(--transition);
    }
    .modal-close:hover { background: var(--teal-lt); }
    .modal-close svg { width: 16px; height: 16px; }
    .modal-body { display: flex; flex: 1; overflow: hidden; }
    .modal-sidebar {
      width: 190px; flex-shrink: 0; border-right: 1px solid var(--border);
      padding: 10px 0; overflow-y: auto;
    }
    .modal-nav-item {
      display: flex; align-items: center; gap: 8px;
      padding: 9px 16px; font-size: 13px; font-weight: 500;
      color: var(--text-muted); cursor: pointer;
      border: none; background: none; width: 100%; text-align: left;
      transition: background var(--transition), color var(--transition);
      position: relative; font-family: inherit;
    }
    .modal-nav-item:hover { background: var(--teal-lt); color: var(--teal); }
    .modal-nav-item.active { background: var(--orange-lt); color: var(--orange); font-weight: 600; }
    .modal-nav-item.active::before {
      content: ''; position: absolute; left: 0; top: 0; bottom: 0;
      width: 3px; background: var(--orange); border-radius: 0 2px 2px 0;
    }
    .modal-nav-item svg { width: 15px; height: 15px; flex-shrink: 0; }
    .modal-content { flex: 1; overflow-y: auto; padding: 20px 24px; }
    .modal-panel { display: none; }
    .modal-panel.active { display: block; }
    /* Drag rows (Priority / Status) */
    .drag-row {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 10px; border: 1px solid var(--border);
      border-radius: var(--radius-sm); margin-bottom: 6px; background: var(--white); font-size: 13px;
    }
    .drag-row:hover { background: var(--bg); }
    .drag-handle { color: var(--text-light); cursor: grab; }
    .drag-handle svg { width: 14px; height: 14px; }
    .drag-color { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
    .drag-name { flex: 1; font-weight: 500; }
    .drag-actions { display: flex; gap: 4px; }
    .drag-action-btn {
      width: 26px; height: 26px; border: none; background: none; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      border-radius: var(--radius-sm); color: var(--text-light);
      transition: background var(--transition), color var(--transition);
    }
    .drag-action-btn:hover { background: var(--teal-lt); color: var(--teal); }
    .drag-action-btn.del:hover { background: #FEE2E2; color: var(--danger); }
    .drag-action-btn svg { width: 13px; height: 13px; }
    /* Member rows */
    .member-row {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 0; border-bottom: 1px solid var(--border);
    }
    .member-row:last-child { border-bottom: none; }
    .member-avatar {
      width: 32px; height: 32px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
    }
    .member-info { flex: 1; min-width: 0; }
    .member-name { font-size: 13px; font-weight: 600; color: var(--text); }
    .member-email { font-size: 11px; color: var(--text-muted); }
    .role-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--teal-lt); color: var(--teal); }
    /* View rows */
    .view-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 0; border-bottom: 1px solid var(--border);
    }
    .view-row:last-child { border-bottom: none; }
    .view-info { display: flex; align-items: center; gap: 10px; }
    .view-icon {
      width: 32px; height: 32px; border-radius: var(--radius-sm);
      display: flex; align-items: center; justify-content: center;
      background: var(--teal-lt); color: var(--teal); flex-shrink: 0;
    }
    .view-icon svg { width: 15px; height: 15px; }
    .view-label { font-size: 13px; font-weight: 500; color: var(--text); }
    .view-badge { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 20px; margin-left: 6px; }
    .view-locked { font-size: 11px; color: var(--text-light); }


