/* ============================================
  Zelect Webkit / Zelkit -- Bundled Stylesheet
   Generated from css/partials by build.sh.
   ============================================ */

/* ---- _variables.css ---- */
/* --- Variables --- */
/* ============================================
  Zelect Webkit – Style Sheet
  Public class namespace: .zel-*
   ============================================ */

/* === Variables (inherit from main site) === */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-elevated: #1b2330;
  --bg-overlay: rgba(1, 4, 9, 0.78);
  --bg-topbar-bg: rgba(22, 27, 34, 0.97);
  --bg-inset: #010409;
  --bg-card: var(--bg-secondary);
  --bg-input: var(--bg-tertiary);
  --border-color: #30363d;
  --border-muted: #21262d;
  --border-strong: #4b5563;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --text-white: #f0f6fc;
  --text-inverse: #0d1117;
  --accent-blue: #1f6feb;
  --accent-blue-hover: #388bfd;
  --accent-cyan: #06b6d4;
  --accent-green: #238636;
  --accent-green-hover: #2ea043;
  --accent-red: #da3633;
  --accent-amber: #d29922;
  --accent-purple: #8250df;
  --shadow-xxs: 0 0.0625rem 0.125rem rgba(0,0,0,0.24);
  --shadow-xs: 0 0.0625rem 0.1875rem rgba(0,0,0,0.32);
  --shadow-sm: 0 0.0625rem 0.1875rem rgba(0,0,0,0.4);
  --shadow-md: 0 0.25rem 1rem rgba(0,0,0,0.5);
  --shadow-lg: 0 0.5rem 2rem rgba(0,0,0,0.6);
  --shadow-xl: 0 1.125rem 2.75rem rgba(0,0,0,0.68);
  --shadow-xxl: 0 1.75rem 4.5rem rgba(0,0,0,0.76);
  --radius-xxs: 0.125rem;
  --radius-xs: 0.25rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-xxl: 1.5rem;
  --transition: all 0.2s ease;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sidebar-width: 11.25rem;
  --topbar-height: 3.5rem;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #fbfcff;
  --bg-tertiary: #edf2f8;
  --bg-elevated: #f2f7ff;
  --bg-overlay: rgba(203, 213, 225, 0.56);
  --bg-topbar-bg: #fbfcff;
  --bg-inset: #e7edf5;
  --border-color: #d5dee8;
  --border-muted: #e7edf4;
  --border-strong: #94a3b8;
  --text-primary: #243042;
  --text-secondary: #64748b;
  --text-white: #0f172a;
  --text-inverse: #ffffff;
  --accent-blue: #1d63d8;
  --accent-blue-hover: #1552b8;
  --accent-cyan: #0e7490;
  --accent-green: #1f883d;
  --accent-green-hover: #1a7f37;
  --accent-red: #cf222e;
  --accent-amber: #b7791f;
  --accent-purple: #7c3aed;
  --shadow-xxs: 0 0.0625rem 0.125rem rgba(15, 23, 42, 0.05);
  --shadow-xs: 0 0.0625rem 0.125rem rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 0.0625rem 0.125rem rgba(15, 23, 42, 0.08);
  --shadow-md: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 1.125rem 2.625rem rgba(15, 23, 42, 0.14);
  --shadow-xl: 0 1.5rem 4rem rgba(15, 23, 42, 0.18);
  --shadow-xxl: 0 2rem 5.375rem rgba(15, 23, 42, 0.22);
  --radius-xxs: 0.125rem;
  --radius-xs: 0.25rem;
  --radius-xl: 1.25rem;
  --radius-xxl: 1.5rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  overscroll-behavior-x: none;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
  overscroll-behavior-x: none;
  touch-action: pan-y pinch-zoom;
}

h1,h2,h3,h4,h5,h6 { color: var(--text-white); font-weight: 600; line-height: 1.25; }
a { color: var(--accent-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-blue-hover); }
code { background: var(--bg-tertiary); padding: 0.15em 0.4em; border-radius: 0.25rem; font-size: 0.85em; color: var(--text-primary); }

html,
body,
.zel-main,
.zel-sidebar,
.zel-tabs,
.zel-table-wrap,
.zel-search-dropdown,
.zel-tenant-list,
.zel-notif-list,
.zel-modal-body,
.zel-touch-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.zel-main::-webkit-scrollbar,
.zel-sidebar::-webkit-scrollbar,
.zel-tabs::-webkit-scrollbar,
.zel-table-wrap::-webkit-scrollbar,
.zel-search-dropdown::-webkit-scrollbar,
.zel-tenant-list::-webkit-scrollbar,
.zel-notif-list::-webkit-scrollbar,
.zel-modal-body::-webkit-scrollbar,
.zel-touch-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}


/* ---- _auth.css ---- */
/* --- Auth Pages --- */
/* ===================== AUTH PAGES ===================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(145deg, var(--bg-primary), #0a0e14);
  position: relative;
}

.auth-wrapper::before {
  content: '';
  position: fixed;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 56.25rem; height: 28.125rem;
  background: radial-gradient(ellipse at center, rgba(31,111,235,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 26.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.auth-card-wide { max-width: 53.75rem; }
.auth-card-narrow { max-width: 36.25rem !important; }

.auth-header { text-align: center; margin-bottom: 1.5rem; }
.auth-logo { margin-bottom: 1rem; }
.auth-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.25rem; }
.auth-subtitle { font-size: 0.875rem; color: var(--text-secondary); }

.auth-form-group { margin-bottom: 1rem; }
.auth-label { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.35rem; display: block; }
.auth-link-sm { font-size: 0.75rem; color: var(--accent-blue); }

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.auth-input-wrap:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 0.1875rem rgba(31,111,235,0.15);
}

.auth-input-wrap > i {
  position: absolute;
  left: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0.6rem 0.75rem 0.6rem 2.25rem;
  font-size: 0.875rem;
  font-family: var(--font-family);
  outline: none;
}

.auth-input::placeholder { color: var(--text-secondary); opacity: 0.5; }
select.auth-input { cursor: pointer; appearance: none; -webkit-appearance: none; }
select.auth-input option,
select.auth-input optgroup {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.auth-toggle-pw {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.8rem;
}
.auth-toggle-pw:hover { color: var(--text-primary); }

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.remember-me {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.remember-me a {
  font-size: 0.75rem;
}

.auth-checkbox input,
.form-checkbox input,
.remember-me input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color, #30363d);
  border-radius: 4px;
  background: var(--bg-primary) !important;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
  margin: 0;
}

.auth-checkbox input:checked,
.form-checkbox input:checked,
.remember-me input[type="checkbox"]:checked {
  background: var(--accent-blue, #1f6feb) !important;
  border-color: var(--accent-blue, #1f6feb);
}

.auth-checkbox input:checked::after,
.form-checkbox input:checked::after,
.remember-me input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.auth-checkbox input:hover,
.form-checkbox input:hover,
.remember-me input[type="checkbox"]:hover {
  border-color: var(--text-secondary, #8b949e);
}

.form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.auth-btn-primary {
  width: 100%;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-family);
}
.auth-btn-primary:hover { background: var(--accent-blue-hover); }
.auth-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-family);
}
.auth-btn-secondary:hover { border-color: var(--text-secondary); color: var(--text-white); }

.auth-btn-sso {
  width: 100%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-family);
}
.auth-btn-sso:hover:not(:disabled) { border-color: var(--text-secondary); color: var(--text-primary); }
.auth-btn-sso:disabled { opacity: 0.4; cursor: not-allowed; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }

.auth-footer-text { text-align: center; font-size: 0.8rem; color: var(--text-secondary); margin-top: 1.25rem; }
.auth-link { color: var(--accent-blue); font-weight: 600; }
.auth-link:hover { color: var(--accent-blue-hover); }

.auth-footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.75rem;
}
.auth-footer-links a { color: var(--text-secondary); }
.auth-footer-links a:hover { color: var(--text-primary); }

.auth-alert {
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}
.auth-alert.success { background: rgba(35,134,54,0.1); border: 1px solid rgba(35,134,54,0.3); color: #3fb950; }
.auth-alert.error { background: rgba(218,54,51,0.1); border: 1px solid rgba(218,54,51,0.3); color: #f85149; }

/* Registration steps */
.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
}

.auth-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.auth-step.active { color: var(--accent-blue); }
.auth-step.completed { color: var(--accent-green); }

.auth-step-num {
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  transition: var(--transition);
}

.auth-step.active .auth-step-num { border-color: var(--accent-blue); background: rgba(31,111,235,0.15); color: var(--accent-blue); }
.auth-step.completed .auth-step-num { border-color: var(--accent-green); background: var(--accent-green); color: #fff; }

.auth-step-line { width: 2.5rem; height: 0.125rem; background: var(--border-color); margin: 0 0.5rem; }

.auth-step-panel { display: none; }
.auth-step-panel.active { display: block; animation: fadeIn 0.2s ease; }

.auth-step-actions { display: flex; justify-content: space-between; margin-top: 1.25rem; }
.auth-step-actions .auth-btn-primary,
.auth-step-actions .auth-btn-secondary { width: auto; }

.auth-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 575.98px) { .auth-form-row { grid-template-columns: 1fr; } }

.auth-pw-strength { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; }
.auth-pw-bar { flex: 1; height: 4px; background: var(--bg-tertiary); border-radius: 2px; overflow: hidden; }
.auth-pw-bar-fill { height: 100%; width: 0%; border-radius: 2px; transition: all 0.3s ease; }
.auth-pw-bar-fill.weak { width: 25%; background: var(--accent-red); }
.auth-pw-bar-fill.fair { width: 50%; background: var(--accent-amber); }
.auth-pw-bar-fill.good { width: 75%; background: var(--accent-blue); }
.auth-pw-bar-fill.strong { width: 100%; background: var(--accent-green); }
.auth-pw-label { font-size: 0.7rem; color: var(--text-secondary); min-width: 2.5rem; }



/* ---- _layout.css ---- */
/* --- App Layout --- */
/* ===================== APP LAYOUT ===================== */
.zel-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
  max-width: 100vw;
  height: var(--topbar-height);
  background: var(--bg-topbar-bg);
  backdrop-filter: blur(0.75rem);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}

.zel-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  padding: 0;
  min-width: 0;
}

.zel-topbar-brand-slot {
  width: var(--sidebar-width);
  height: 100%;
  border-right: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.75rem;
  flex-shrink: 0;
  min-width: 0;
}

.zel-topbar-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  gap: 1rem;
}

.zel-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  opacity: 75%;
}

.zel-brand img,
.zel-brand .zel-brand-logo {
  height: 2.5rem;
  width: auto;
  max-width: 11rem;
  /* margin-top: -0.35rem; */
  display: block;
  object-fit: contain;
}
.zel-brand-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.zel-brand-label-topbar {
  white-space: nowrap;
  line-height: 1;
}

.zel-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  width: 2.125rem;
  height: 2.125rem;
}
.zel-sidebar-toggle:hover { color: var(--text-white); border-color: var(--text-secondary); }

.zel-topbar-search-trigger {
  display: none;
}

.zel-topbar-search {
  display: flex;
  align-items: center;
  position: relative;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 0.75rem;
  gap: 0.5rem;
  width: 20rem;
  transition: width 0.25s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.zel-topbar-search:focus-within { border-color: var(--accent-blue); box-shadow: 0 0 0 0.1875rem rgba(31,111,235,0.1); }
.zel-topbar-search i { color: var(--text-secondary); font-size: 0.8rem; }
.zel-topbar-search input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 0.4rem 0;
  outline: none;
  width: 100%;
  font-family: var(--font-family);
  /* Avoid double search icon if global `input[type=search]` SVG rules load after webkit. */
  background-image: none !important;
  -webkit-appearance: none;
  appearance: none;
}
.zel-topbar-search input::placeholder { color: var(--text-secondary); opacity: 0.6; }

/* Suppress browser autofill/autocomplete dropdown on search input */
#topbarSearchInput::-webkit-search-decoration,
#topbarSearchInput::-webkit-search-cancel-button,
#topbarSearchInput::-webkit-search-results-button,
#topbarSearchInput::-webkit-search-results-decoration { display: none; }
#topbarSearchInput::-webkit-contacts-auto-fill-button,
#topbarSearchInput::-webkit-credentials-auto-fill-button { visibility: hidden; }
#topbarSearchInput { appearance: none; -webkit-appearance: none; }

.zel-topbar-search.is-expanded,
.zel-topbar-search:focus-within {
  width: 30rem;
}

.zel-topbar-search.is-animating .zel-search-dropdown { display: none !important; }

.zel-search-dropdown {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 250;
  padding: 0.35rem;
  max-height: 26.25rem;
  overflow-y: auto;
  animation: searchDropdownIn 0.15s ease both;
}

@keyframes searchDropdownIn {
  from { opacity: 0; transform: translateY(-0.25rem); }
  to   { opacity: 1; transform: translateY(0); }
}

.zel-search-dropdown[hidden] { display: none; }

.zel-search-group-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.5rem 0.6rem 0.25rem;
}

.zel-search-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: none;
  transition: var(--transition);
}
.zel-search-item:hover { background: var(--bg-tertiary); color: var(--text-white); }
.zel-search-item .zel-search-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  flex: 0 0 auto;
  font-size: 0.8rem;
}
.zel-search-item .zel-search-meta {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-family: monospace;
}
.zel-search-empty {
  padding: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.zel-icon-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.3rem;
  cursor: pointer;
  font-size: 1.4rem;
  position: relative;
  transition: var(--transition);
}
.zel-icon-btn:hover { color: var(--text-white); background: var(--bg-tertiary); border-color: var(--border-color); }

.zel-badge-dot {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  width: 0.4375rem;
  height: 0.4375rem;
  background: var(--accent-blue);
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}

.zel-user-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.zel-leftmargin--7 { margin-left: -0.4375rem; }
.zel-leftmargin--10 { margin-left: -0.625rem; }
.zel-leftmargin--15 { margin-left: -0.9375rem; }

.zel-user-menu:hover { background: var(--bg-tertiary); }

.zel-avatar {
  width: 1.875rem; height: 1.875rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}
.zel-avatar-lg { width: 2.5rem; height: 2.5rem; font-size: 0.8rem; }
.zel-avatar-xl { width: 4rem; height: 4rem; font-size: 1.2rem; }

.zel-user-name { font-size: 0.8rem; font-weight: 600; color: var(--text-white); line-height: 1.2; }
.zel-user-role { font-size: 0.65rem; color: var(--text-secondary); }

/* User dropdown */
.zel-user-menu-wrap { position: relative; }

.zel-user-dropdown {
  position: fixed;
  top: calc(var(--topbar-height) + 0.25rem);
  right: 1rem;
  width: 16.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}

.zel-user-menu-wrap .zel-user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  left: auto;
}
.zel-user-dropdown[hidden] { display: none; }

.zel-dropdown-header { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; }
.zel-dropdown-divider { height: 1px; background: var(--border-color); }

.zel-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.zel-dropdown-item:hover { background: var(--bg-tertiary); color: var(--text-white); }
.zel-dropdown-item i { width: 1rem; text-align: center; color: var(--text-secondary); }
.zel-dropdown-danger { color: var(--accent-red); }
.zel-dropdown-danger i { color: var(--accent-red); }
.zel-dropdown-danger:hover { background: rgba(218,54,51,0.1); }

/* Notification panel */
.zel-notification-panel {
  position: fixed;
  top: calc(var(--topbar-height) + 0.25rem);
  right: 4rem;
  width: 24.625rem;
  max-height: 60rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl, var(--shadow-lg));
  z-index: 260;
  overflow: hidden;
}
.zel-notification-panel[hidden] { display: none; }

.zel-notification-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 245;
}

body.zel-notification-open .zel-notification-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.zel-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}
.zel-notif-header h6 { font-size: 0.85rem; margin: 0; }
.zel-notif-list { max-height: 23.75rem; overflow-y: auto; }

.zel-notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-muted);
  transition: var(--transition);
  position: relative;
}
.zel-notif-item:hover { background: var(--bg-tertiary); }
.zel-notif-item.unread { background: rgba(31,111,235,0.04); }
.zel-notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0.1875rem;
  background: var(--accent-blue);
}
.zel-notif-icon {
  width: 2rem; height: 2rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.8rem;
}
.zel-notif-icon.blue { background: rgba(31,111,235,0.1); color: #58a6ff; }
.zel-notif-icon.green { background: rgba(35,134,54,0.1); color: #3fb950; }
.zel-notif-icon.purple { background: rgba(130,80,255,0.1); color: #bc8cff; }
.zel-notif-icon.amber { background: rgba(210,153,34,0.1); color: var(--accent-amber); }

.zel-notif-text { font-size: 0.8rem; color: var(--text-primary); line-height: 1.4; }
.zel-notif-time { font-size: 0.7rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* Layout */
.zel-layout {
  display: flex;
  margin-top: var(--topbar-height);
  min-height: calc(100vh - var(--topbar-height));
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-x: clip;
}

.zel-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 50;
  transition: transform 0.25s ease;
}

.zel-nav { flex: 1; padding: 0.5rem 0.1rem; }
.zel-nav-section { margin-bottom: 0.5rem; }
.zel-nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  padding: 0.5rem 0.45rem 0.1rem 0.45rem;
}

.zel-nav-label-short {
  display: none;
}

.zel-nav-label-danger {
  color: var(--accent-red) !important;
}

.zel-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none !important;
}

.zel-nav-item-label {
  min-width: 0;
}
/* Anchor pseudo beats `.zel-nav-item` alone (global `a:hover` underline wins otherwise). */
a.zel-nav-item,
a.zel-nav-item:hover,
a.zel-nav-item:focus,
a.zel-nav-item:focus-visible {
  text-decoration: none !important;
}
.zel-sidebar a,
.zel-sidebar a:hover,
.zel-sidebar a:focus,
.zel-sidebar a:focus-visible {
  text-decoration: none !important;
}
.zel-nav-item:hover { color: var(--text-white); background: var(--bg-tertiary); }
.zel-nav-item.active { color: var(--text-white); background: rgba(31,111,235,0.12); }
.zel-nav-item.active i { color: var(--accent-blue); }
.zel-nav-item i { width: 1.125rem; text-align: center; font-size: 0.85rem; }

.zel-sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-color);
}

.zel-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(31,111,235,0.1);
  border: 1px solid rgba(31,111,235,0.2);
  border-radius: 1.25rem;
  padding: 0.25rem 0.65rem;
}

.zel-sidebar-version {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  opacity: 0.6;
}

.zel-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  padding: 1.5rem;
  min-height: calc(100vh - var(--topbar-height));
  max-width: 100vw;
  overflow-x: hidden;
  overflow-x: clip;
}

.zel-sidebar-backdrop {
  position: fixed;
  top: var(--topbar-height);
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0,0,0,0.42);
  z-index: 175;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

/* Compact icon rail: below 1080px, above hamburger drawer */
@media (max-width: 1079.98px) and (min-width: 820px) {
  :root {
    --sidebar-width: 3.75rem;
  }

  .zel-brand-label-topbar {
    display: none;
  }

  .zel-topbar-brand-slot {
    padding: 0 0.35rem;
    gap: 0.35rem;
    justify-content: center;
  }

  .zel-nav {
    padding: 0.35rem 0.2rem;
  }

  .zel-nav-section {
    margin-bottom: 0.35rem;
  }

  .zel-nav-label {
    text-align: center;
    padding: 0.45rem 0.15rem 0.2rem;
    letter-spacing: 0.06em;
    font-size: 0.55rem;
  }

  .zel-nav-label-full {
    display: none;
  }

  .zel-nav-label-short {
    display: block;
  }

  .zel-nav-item {
    justify-content: center;
    gap: 0;
    padding: 0.45rem 0.2rem;
    position: relative;
  }

  .zel-nav-item-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .zel-nav-item i {
    width: auto;
    font-size: 0.95rem;
  }

  .zel-nav-item.active {
    background: transparent;
  }

  .zel-nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18%;
    bottom: 18%;
    width: 3px;
    border-radius: 999px;
    background: var(--accent-blue, #1f6feb);
  }

  .v2-recent-tickets,
  #v2-recent-tickets-section,
  .v2-platform-card-slot,
  #saas-platform-card-slot {
    display: none !important;
  }
}

/* Hamburger / off-canvas drawer */
@media (max-width: 819.98px) {
  body.zel-sidebar-open {
    overflow: hidden;
  }

  .zel-topbar-brand-slot {
    width: auto;
    border-right: none;
    padding: 0 0.6rem;
    gap: 0.45rem;
  }

  .zel-sidebar-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .zel-topbar-content {
    padding: 0 0.75rem;
    gap: 0.75rem;
  }

  .zel-topbar-content > .zel-cluster {
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .zel-brand-label-topbar {
    display: none;
  }

  .zel-sidebar {
    width: min(16.25rem, 72vw);
    transform: translateX(-100%);
    z-index: 220;
    box-shadow: var(--shadow-lg);
  }
  .zel-sidebar.open { transform: translateX(0); }

  body.zel-sidebar-open .zel-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .zel-main { 
    margin-left: 0;
  }
}

@media (max-width: 767.98px) {
  .zel-topbar-search {
    display: none;
  }

  .zel-topbar-search-trigger {
    display: inline-flex;
  }

  .zel-topbar-content {
    padding: 0 0.5rem 0 0;
    gap: 0.4rem;
  }

  .zel-topbar-content > .zel-cluster {
    gap: 0.35rem;
  }

  .zel-topbar-brand-slot .zel-brand {
    display: none;
  }

  .zel-icon-btn {
    width: 2.125rem;
    height: 2.125rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .zel-user-menu-wrap {
    flex: 0 0 auto;
  }

  .zel-user-menu {
    padding: 0.2rem;
    gap: 0;
  }

  .zel-user-menu .zel-avatar-lg {
    width: 2rem;
    height: 2rem;
    font-size: 0.7rem;
  }

  .zel-user-menu > div:not(.zel-avatar),
  .zel-user-menu > i {
    display: none;
  }

  .zel-user-menu-wrap .zel-user-dropdown {
    position: fixed;
    top: calc(var(--topbar-height) + 0.375rem);
    right: 0.5rem;
    width: min(17.5rem, calc(100vw - 1rem));
  }

  .zel-main {
    padding: 1rem 0.75rem;
    width: 100%;
  }

  .zel-notification-panel {
    right: 0.5rem;
    width: calc(100vw - 1rem);
    max-height: calc(100vh - var(--topbar-height) - 1rem);
  }
}

@media (max-width: 575.98px) {
  .zel-topbar-brand-slot {
    padding-right: 0.35rem;
  }

  .zel-brand .zel-ml-sm {
    display: none;
  }

  .zel-brand .zel-avatar-md {
    width: 1.875rem !important;
    height: 1.875rem !important;
  }

  .zel-sidebar {
    width: min(15.5rem, 72vw);
  }
}


/* ---- _components.css ---- */
/* --- Page Components --- */
/* ===================== PAGE COMPONENTS ===================== */
.zel-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.zel-page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.15rem; }
.zel-page-subtitle { font-size: 0.85rem; color: var(--text-secondary); }

/* Tabs */
.zel-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.zel-tab {
  background: none;
  border: none;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  padding: 0 1rem 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-family: var(--font-family);
}
.zel-tab:hover { color: var(--text-primary); }
.zel-tab.active { color: var(--text-white); border-bottom-color: var(--accent-blue); }

/* Monochrome list/card action icon (no border / no fill).
   Distinct from topbar `.zel-icon-btn` in _layout.css. */
.zel-action-icon-btn {
  appearance: none;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  box-shadow: none;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.zel-action-icon-btn:hover:not(:disabled),
.zel-action-icon-btn:focus-visible:not(:disabled) {
  color: var(--text-primary);
  background: transparent;
}

.zel-action-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Activate / deactivate toggle (fa-toggle-on / fa-toggle-off). */
.zel-activation-toggle-btn {
  appearance: none;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  box-shadow: none;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}

.zel-activation-toggle-btn:hover:not(:disabled),
.zel-activation-toggle-btn:focus-visible:not(:disabled) {
  color: var(--text-primary);
  background: transparent;
}

.zel-activation-toggle-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Connection banner */
.zel-connection-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.zel-connection-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--accent-amber);
  flex-shrink: 0;
}
.zel-connection-dot.online { background: var(--accent-green); box-shadow: 0 0 0.375rem rgba(35,134,54,0.5); animation: pulse-dot 2s infinite; }
.zel-connection-dot.offline { background: var(--accent-red); }

@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* Cards */
.zel-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  min-width: 0;
}

.zel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.zel-card-title { font-size: 0.9rem; font-weight: 600; margin: 0; }
.zel-card-desc { font-size: 0.825rem; color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.6; }

.zel-card-danger { border-color: rgba(218,54,51,0.3); }

/* Stat cards */
.zel-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  min-width: 0;
}
.zel-stat-card:hover { border-color: var(--accent-blue); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.zel-stat-icon {
  width: 2.1rem; height: 2.1rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.zel-stat-icon.blue { background: rgba(31,111,235,0.1); color: #58a6ff; }
.zel-stat-icon.green { background: rgba(35,134,54,0.1); color: #3fb950; }
.zel-stat-icon.purple { background: rgba(130,80,255,0.1); color: #bc8cff; }
.zel-stat-icon.amber { background: rgba(210,153,34,0.1); color: var(--accent-amber); }

.zel-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--text-white); line-height: 1.1; }
.zel-stat-label { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.35; }

.zel-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.25rem, 1fr));
  gap: 0.85rem;
}

/* Tables */
.zel-table-wrap { overflow-x: auto; }

.zel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.825rem;
}

.zel-table thead th {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  position: sticky;
  top: 0;
  text-align: left;
}

.zel-table tbody td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border-muted);
  color: var(--text-primary);
  vertical-align: middle;
}

.zel-table tbody tr { transition: var(--transition); }
.zel-table tbody tr:hover { background: rgba(31,111,235,0.04); }

.zel-table-tree { --zel-tree-child-indent: 2rem; }
.zel-tree-row td:first-child { padding-left: 0.6rem; }
.zel-tree-child td:first-child { padding-left: var(--zel-tree-child-indent, 2rem); color: var(--text-secondary); }
.zel-tree-chev {
  font-size: 0.6rem;
  width: 0.625rem;
  display: inline-block;
  margin-right: 0.4rem;
  color: var(--text-secondary);
}
.zel-tree-group td:first-child { color: var(--text-white); }

.zel-table-empty td { padding: 0 !important; }

.zel-empty-state,
.zel-empty-state-sm {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-secondary);
}
.zel-empty-state i { font-size: 2.5rem; color: var(--border-color); margin-bottom: 1rem; }
.zel-empty-state h4 { font-size: 1rem; margin-bottom: 0.35rem; color: var(--text-secondary); }
.zel-empty-state p { font-size: 0.8rem; max-width: 22.5rem; }

.zel-empty-state--dashed {
  border: 1px dashed var(--border-secondary, var(--border-color));
  border-radius: var(--radius-md, 1rem);
  background: var(--bg-secondary);
  color: var(--text-muted, var(--text-secondary));
}
.zel-empty-state--dashed h4 { color: var(--text-primary); }
.zel-empty-state--dashed p { max-width: 32.5rem; line-height: 1.55; }
.zel-empty-state--dashed a { color: var(--text-link, var(--accent-blue)); }

.zel-empty-state-sm { padding: 2rem 1rem; flex-direction: row; gap: 0.75rem; }
.zel-empty-state-sm i { font-size: 1.2rem; margin-bottom: 0; }
.zel-empty-state-sm span { font-size: 0.8rem; }

.zel-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.zel-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.zel-pagination button {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
}
.zel-pagination button:hover { color: var(--text-white); border-color: var(--text-secondary); }
.zel-pagination button.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }

/* Viewer button */
.zel-viewer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem; height: 1.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}
.zel-viewer-btn:hover { color: var(--text-white); background: var(--bg-tertiary); }
:root[data-theme="light"] .zel-viewer-btn { color: #64748b; }
:root[data-theme="light"] .zel-viewer-btn:hover { color: #1e293b; background: var(--bg-tertiary); }

/* Filter bar */
.zel-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.zel-filter-group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.zel-input-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.zel-input-icon i {
  position: absolute;
  left: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  pointer-events: none;
}
.zel-input-icon .zel-input { padding-left: 2.25rem; min-width: 15.625rem; }

.zel-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  display: block;
}

.zel-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-size: 0.825rem;
  outline: none;
  transition: var(--transition);
  font-family: var(--font-family);
  width: 100%;
}
.zel-input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(31,111,235,0.1); }
.zel-input::placeholder { color: var(--text-secondary); opacity: 0.5; }
.zel-input-sm { width: 8.75rem; }

textarea.zel-input { resize: vertical; min-height: 3.75rem; }

.zel-input-hint {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.zel-select {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  padding-right: 2rem;
  font-size: 0.825rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
  color-scheme: dark;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: inset 0 0.0625rem 0 rgba(255,255,255,0.03);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position:
    calc(100% - 1rem) calc(50% - 0.125rem),
    calc(100% - 0.6875rem) calc(50% - 0.125rem);
  background-size: 0.3125rem 0.3125rem, 0.3125rem 0.3125rem;
  background-repeat: no-repeat;
}
.zel-select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 0.1875rem rgba(31,111,235,0.1);
}
.zel-select:focus-visible { outline: none; }
.zel-select::-ms-expand { display: none; }
.zel-select option,
.zel-select optgroup {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: none;
}
.zel-select option:checked {
  background: var(--accent-blue);
  color: #ffffff;
}

.zel-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-muted);
  flex-wrap: wrap;
}

.zel-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-muted);
  gap: 1rem;
}
.zel-toggle-row:last-child { border-bottom: none; }
.zel-toggle-label { font-size: 0.8rem; font-weight: 400; color: var(--text-white); }
.zel-toggle-desc { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.1rem; }

.zel-switch {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.375rem;
  flex-shrink: 0;
}
.zel-switch input { opacity: 0; width: 0; height: 0; }
.zel-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 1.375rem;
  transition: var(--transition);
}
.zel-slider::before {
  content: '';
  position: absolute;
  width: 1rem; height: 1rem;
  left: 0.125rem; bottom: 0.125rem;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: var(--transition);
}
.zel-switch input:checked + .zel-slider { background: var(--accent-blue); border-color: var(--accent-blue); }
.zel-switch input:checked + .zel-slider::before { transform: translateX(1.125rem); background: #fff; }

/* Buttons */
.zel-btn-primary {
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-family);
}
.zel-btn-primary:hover { background: var(--accent-blue-hover); }

.zel-btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-family);
}
.zel-btn-outline:hover { color: var(--text-white); border-color: var(--text-secondary); }
.zel-btn-outline:disabled { opacity: 0.4; cursor: not-allowed; }

.zel-btn-danger-outline {
  background: transparent;
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
}
.zel-btn-danger-outline:hover { background: rgba(218,54,51,0.15); }

.zel-link-btn {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-family);
  transition: var(--transition);
}
.zel-link-btn:hover { color: var(--accent-blue-hover); }

/* Badges */
.zel-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.zel-badge.blue { background: rgba(31,111,235,0.15); color: #58a6ff; }
.zel-badge.green { background: rgba(35,134,54,0.15); color: #3fb950; }
.zel-badge.amber { background: rgba(210,153,34,0.15); color: var(--accent-amber); }
.zel-badge.red { background: rgba(218,54,51,0.15); color: #f85149; }
.zel-badge.purple { background: rgba(130,80,255,0.15); color: #bc8cff; }

.zel-status-dot {
  width: 0.375rem; height: 0.375rem;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.4rem;
  margin-bottom: 2px;
}
.zel-status-dot.green { background: #3fb950; }
.zel-status-dot.amber { background: var(--accent-amber); }
.zel-status-dot.red { background: var(--accent-red); }
.zel-status-dot.blue { background: #58a6ff; }
.zel-status-dot.purple { background: #bc8cff; }

/* Quick Actions */
.zel-quick-actions { display: flex; flex-direction: column; gap: 0.25rem; }

.zel-quick-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}
.zel-quick-action:hover { background: var(--bg-tertiary); color: var(--text-white); }
.zel-quick-action .fa-chevron-right { margin-left: auto; font-size: 0.6rem; color: var(--text-secondary); }

.zel-qa-icon {
  width: 2.125rem; height: 2.125rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.zel-qa-icon.blue { background: rgba(31,111,235,0.1); color: #58a6ff; }
.zel-qa-icon.green { background: rgba(35,134,54,0.1); color: #3fb950; }
.zel-qa-icon.purple { background: rgba(130,80,255,0.1); color: #bc8cff; }
.zel-qa-icon.amber { background: rgba(210,153,34,0.1); color: var(--accent-amber); }

.zel-qa-title { font-size: 0.825rem; font-weight: 600; color: var(--text-white); }
.zel-qa-desc { font-size: 0.7rem; color: var(--text-secondary); }

/* Usage / progress */
.zel-usage-items { display: flex; flex-direction: column; gap: 1rem; }
.zel-usage-label { font-size: 0.75rem; color: var(--text-secondary); }
.zel-usage-val { font-size: 0.75rem; font-weight: 600; color: var(--text-primary); font-family: monospace; }

.zel-progress {
  height: 0.375rem;
  background: var(--bg-tertiary);
  border-radius: 0.1875rem;
  overflow: hidden;
}

.zel-progress-bar {
  height: 100%;
  border-radius: 0.1875rem;
  background: var(--accent-green);
  transition: width 0.4s ease;
}
.zel-progress-bar.blue { background: var(--accent-blue); }
.zel-progress-bar.purple { background: var(--accent-purple); }
.zel-progress-bar.amber { background: var(--accent-amber); }

@media (max-width: 767.98px) {
  .zel-filter-bar { flex-direction: column; align-items: stretch; }
  .zel-filter-group { flex-wrap: wrap; }
  .zel-input-icon .zel-input { min-width: 100%; }
  .zel-table { font-size: 0.75rem; }
  .zel-page-title { font-size: 1.25rem; }
  .zel-page-header { gap: 0.75rem; }
  .zel-card { padding: 1rem; }
  .zel-card-header { align-items: flex-start; gap: 0.5rem; flex-wrap: wrap; }

  .zel-page-subtitle,
  .zel-card-title,
  .zel-stat-value,
  .zel-stat-label,
  .zel-qa-title,
  .zel-qa-desc,
  .zel-usage-label,
  .zel-usage-val,
  .zel-funnel-row > span:first-child,
  .zel-list-row-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zel-tabs {
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    scroll-padding-left: 0;
  }

  .zel-tab {
    flex: 0 0 auto;
    padding: 0.55rem 0.7rem;
    gap: 0.32rem;
    font-size: 0.72rem;
  }

  .zel-tab i {
    font-size: 0.78rem;
  }

  .zel-stat-card {
    gap: 0.55rem;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
  }

  .zel-stat-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.82rem;
  }

  .zel-stat-card > div:not(.zel-stat-icon) {
    min-width: 0;
  }

  .zel-stat-value {
    font-size: 1.05rem;
    line-height: 1.1;
  }

  .zel-stat-label {
    font-size: 0.66rem;
    line-height: 1.25;
  }

  .zel-quick-action {
    min-width: 0;
    gap: 0.55rem;
    padding: 0.55rem 0.45rem;
  }

  .zel-quick-action > div:not(.zel-qa-icon) {
    flex: 1;
    min-width: 0;
  }

  .zel-quick-action .fa-chevron-right {
    flex: 0 0 auto;
    margin-left: 0.25rem;
  }

  .zel-qa-icon {
    width: 1.875rem;
    height: 1.875rem;
    font-size: 0.75rem;
  }

  .zel-qa-title {
    font-size: 0.76rem;
    line-height: 1.2;
  }

  .zel-qa-desc {
    font-size: 0.64rem;
    line-height: 1.25;
  }

  .zel-usage-items {
    gap: 0.75rem;
  }

  .zel-split {
    min-width: 0;
    gap: 0.5rem;
  }

  .zel-split > * {
    min-width: 0;
  }

  .zel-usage-label,
  .zel-usage-val {
    font-size: 0.68rem;
  }

  .zel-usage-val {
    flex: 0 1 auto;
    max-width: 56%;
    text-align: right;
  }

  .zel-progress {
    height: 0.3125rem;
  }
}

@media (max-width: 575.98px) {
  .zel-tabs {
    margin-bottom: 1rem;
  }

  .zel-tab {
    padding: 0.5rem 0.58rem;
    gap: 0.28rem;
    font-size: 0.68rem;
  }

  .zel-tab i {
    font-size: 0.72rem;
  }
}


/* ---- _shell-bar.css ---- */
/* ===================== SHELL BAR (page tab chrome) ===================== */
/*
 * Standard page-level tab bar used with existing .zel-tabs / .zel-tab primitives.
 * Does NOT replace .zel-tabs — pairs with it:
 *
 *   <div class="zel-page-app">
 *     <div class="zel-shell-bar">
 *       <nav class="zel-tabs zel-shell-bar__tabs" role="tablist">…</nav>
 *       <div class="zel-shell-bar__actions">…</div>
 *     </div>
 *   </div>
 *
 * Mid-page tab strip (Monitoring / Import pattern):
 *
 *   <nav class="zel-tabs zel-inline-tabs zel-inline-tabs--scroll" role="tablist">…</nav>
 */

.zel-page-app {
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
}

.zel-shell-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.55rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, #30363d);
  flex-wrap: wrap;
}

/*
 * settings-shell is a flex column with gap: 1rem. When .zel-shell-bar is a direct
 * child, margin-bottom + gap stack to ~2rem. Zero the margin so only gap remains.
 * Nested bars (e.g. inside .settings-section) keep margin-bottom: 1rem.
 * Pages that already zero gap (ai-gateway) are unchanged.
 */
.settings-shell > .zel-shell-bar {
  margin-bottom: 0;
}

.zel-shell-bar__tabs {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.zel-shell-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.zel-shell-bar__search {
  display: flex;
  align-items: center;
}

.zel-shell-bar__search-input {
  padding: 0.4rem 0.75rem;
  background: var(--bg-input, var(--bg-secondary));
  border: 1px solid var(--border-color, #30363d);
  border-radius: var(--radius-sm, 4px);
  color: var(--text-primary, #f1f5f9);
  font-size: 0.8rem;
  width: 200px;
  min-width: 140px;
  font-family: var(--font-family);
}

.zel-shell-bar__search-input::placeholder {
  color: var(--text-secondary, #8b949e);
}

.zel-shell-bar__search-input:focus {
  outline: none;
  border-color: var(--accent-blue, #58a6ff);
}

/* Breadcrumb slot (FAQ article view) */
.zel-shell-bar__breadcrumb {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0;
}

/* Inside a card / below hero — no page-top spacing */
.zel-shell-bar--embedded {
  padding-top: 0;
  margin-bottom: 0.75rem;
}

.zel-shell-bar-topbar-adjust,
#rulesets-top-tabs.zel-shell-bar-topbar-adjust {
  padding-top: 0;
  /* margin-top: -1rem; */
  /* margin-bottom: 0; */
}

/* Article/detail mode — tabs hidden, breadcrumb row */
.zel-shell-bar--detail {
  align-items: center;
  border-bottom-color: transparent;
  margin-bottom: 0;
}

a.zel-tab,
a.zel-tab:hover {
  text-decoration: none;
  color: var(--text-secondary);
}

a.zel-tab:hover {
  color: var(--text-primary);
}

a.zel-tab.active {
  color: var(--text-white);
}

/* Mid-page inline tab strip (not pinned to page top) */
.zel-inline-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-secondary, var(--border-color));
  margin-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.zel-inline-tabs--scroll {
  flex-wrap: nowrap;
  padding-bottom: 2px;
}

.zel-inline-tabs--scroll .zel-tab {
  white-space: nowrap;
  flex-shrink: 0;
}

.zel-inline-tabs .zel-tab {
  border: none;
  background: transparent;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  font-weight: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: 0;
}

.zel-inline-tabs .zel-tab.active {
  color: var(--text-primary, var(--text-white));
  border-bottom-color: var(--accent-blue, var(--color-primary));
}

@media (max-width: 767.98px) {
  .zel-shell-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .zel-shell-bar__actions {
    justify-content: flex-end;
  }

  .zel-shell-bar__search-input {
    width: 100%;
    min-width: 0;
  }
}


/* ---- _switch-tabs.css ---- */
/* Segmented switch-style tab bar (CTI settings, devices sidebar source toggle, etc.) */

.zel-switch-tabs,
.devices-inline-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  margin-bottom: var(--spacing-md, 16px);
  border-radius: 12px;
  border: 1px solid var(--border-color, var(--border-secondary));
  background: var(--bg-primary, var(--bg-secondary));
}

.cti-tab-bar.zel-switch-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.zel-switch-tabs--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Compact variant for narrow secondary sidebars (e.g. /devices source toggle) */
.zel-switch-tabs--mini {
  gap: 3px;
  padding: 3px;
  border-radius: 9px;
}

.zel-switch-tabs--mini .zel-switch-tab {
  padding: 5px 2px;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.devices-source-tabs.zel-switch-tabs {
  margin: 6px 4px 10px;
}

.zel-switch-tab__badge {
  display: block;
  margin-top: 1px;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  opacity: 0.85;
}

.zel-switch-tab.active .zel-switch-tab__badge {
  color: var(--text-secondary);
}

.settings-nav-item.is-placeholder {
  opacity: 0.65;
  cursor: default;
}

.zel-switch-tab,
.devices-inline-tab-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  font-family: inherit;
  text-align: center;
}

.zel-switch-tab:hover,
.devices-inline-tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.zel-switch-tab.active,
.devices-inline-tab-btn.active {
  background: var(--bg-active, var(--bg-secondary));
  border-color: var(--border-primary, var(--border-color));
  color: var(--text-primary);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.08));
}

.zel-switch-tab:focus-visible,
.devices-inline-tab-btn:focus-visible {
  outline: 2px solid var(--color-primary, var(--accent-blue));
  outline-offset: 2px;
}

.devices-main-content .settings-sidebar .devices-inline-tabs {
  margin: 8px 6px var(--spacing-md);
}


/* ---- _v2-sidebar.css ---- */
/* Live shell sidebar action bar + create menu (from app-v2.css) */

.zel-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.zel-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.zel-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.v2-sidebar-bar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.v2-sidebar-bar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  background: transparent;
  border: none;
  flex: 0 0 auto;
  font-size: 0.9rem;
}

.v2-sidebar-bar-icon:hover,
.v2-sidebar-bar-icon.active {
  background: rgba(31, 111, 235, 0.12);
  color: var(--text-white);
}

.v2-sidebar-bar-add {
  margin-left: 0;
  width: 100%;
  height: 34px;
  background: transparent;
  color: var(--accent-blue, #1f6feb) !important;
  border: none;
  box-shadow: none;
  font-size: 0.8rem;
}

.v2-sidebar-bar-add:hover {
  background: rgba(31, 111, 235, 0.12);
  color: var(--text-white, #f0f6fc) !important;
}

.v2-sidebar-create-wrap {
  position: relative;
  width: 100%;
}

.v2-sidebar-create-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: auto;
  right: 0;
  width: max-content;
  min-width: 11rem;
  max-width: calc(var(--sidebar-width, 11.25rem) - 0.5rem);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border-color, #30363d);
  background: var(--bg-card, #161b22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.v2-sidebar-create-menu[hidden] {
  display: none !important;
}

.v2-sidebar-create-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  color: var(--text-primary, #f0f6fc);
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}

.v2-sidebar-create-item:hover {
  background: rgba(31, 111, 235, 0.12);
}

.v2-sidebar-create-item i {
  width: 14px;
  text-align: center;
  color: var(--accent-blue, #1f6feb);
}

.v2-sidebar-create-item span {
  white-space: nowrap;
}

@media (max-width: 1079.98px) and (min-width: 820px) {
  .v2-sidebar-bar {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-columns: unset;
    gap: 0.2rem;
    padding: 0.3rem;
  }

  .v2-sidebar-bar-icon,
  .v2-sidebar-bar-add {
    height: 30px;
    font-size: 0.85rem;
  }

  .v2-sidebar-create-menu {
    left: calc(100% + 6px);
    right: auto;
    bottom: 0;
    max-width: 14rem;
  }
}

.dash-brand-size-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 22rem;
}

.dash-brand-size-tabs.zel-switch-tabs--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 28rem;
}


/* ---- _searchable-select.css ---- */
/* Webkit searchable select — shared with ticket detail property fields */

.searchable-select-wrapper {
  position: relative;
  width: 100%;
}

.searchable-select-input {
  width: 100%;
}

.zel-prop-select {
  position: relative;
}

.zk-combo--open {
  z-index: 20;
}

.zk-combo--modal .searchable-dropdown {
  z-index: 1200;
}

.zk-combo--modal .zk-combo-trigger,
.zk-combo--modal .searchable-select-input {
  padding: 0.4375rem 0.625rem;
  background: var(--bg-tertiary, #0f172a);
  border: 1px solid var(--border-primary, #334155);
  border-radius: var(--radius-md, 0.375rem);
  color: var(--text-primary, #f1f5f9);
  font-size: 0.8125rem;
  transition: border-color 0.15s ease;
}

.zk-combo--modal .zk-combo-trigger:focus,
.zk-combo--modal .searchable-select-input:focus {
  outline: none;
  border-color: var(--color-primary, #3b82f6);
}

.zel-prop-select-trigger,
.zk-combo-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  box-sizing: border-box;
}

/* Reset global forms.css button rules for combobox triggers */
button.zel-prop-select-trigger,
button.zk-combo-trigger {
  font-weight: inherit;
  opacity: 1;
}

button.zel-prop-select-trigger:hover,
button.zk-combo-trigger:hover {
  opacity: 1;
}

.zel-prop-select-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zel-prop-select-placeholder {
  color: var(--text-tertiary, #94a3b8);
}

.zk-combo-chevron {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--text-muted, #64748b);
  line-height: 1;
  pointer-events: none;
}

.searchable-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-secondary, #1e293b);
  border: 1px solid var(--border-color, var(--border-primary, #334155));
  border-radius: var(--radius-sm, 0.375rem);
  z-index: 100;
  display: none;
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.25));
  margin-top: 2px;
}

.searchable-dropdown.show {
  display: block;
}

.searchable-dropdown-item {
  padding: var(--spacing-xs, 0.375rem) var(--spacing-sm, 0.5rem);
  cursor: pointer;
  transition: background var(--transition-fast, 0.12s ease);
  font-size: 0.85rem;
  color: var(--text-primary, #f1f5f9);
}

.searchable-dropdown-item__row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}

.searchable-dropdown-item__label {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchable-dropdown-item .item-subtitle {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.6875rem;
  color: var(--text-tertiary, #94a3b8);
}

.searchable-dropdown-item:hover:not(.disabled) {
  background: var(--bg-hover, var(--bg-tertiary, #334155));
}

.searchable-dropdown-item.selected {
  background: var(--color-primary-alpha, rgba(59, 130, 246, 0.15));
}

.searchable-dropdown-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.searchable-dropdown-empty {
  padding: var(--spacing-sm, 0.5rem);
  color: var(--text-tertiary, #94a3b8);
  font-size: 0.85rem;
  text-align: center;
}
.searchable-dropdown-add {
    display: block;
    width: 100%;
    padding: var(--spacing-sm);
    border: none;
    background: transparent;
    color: var(--color-primary);
    font-size: 0.85rem;
    text-align: center;
    cursor: pointer;
}

.searchable-dropdown-add:hover {
    background: var(--bg-hover);
}

.searchable-dropdown-footer {
    border-top: 1px solid var(--border-primary, #334155);
    margin-top: 0.25rem;
    padding-top: 0.25rem;
}

.searchable-dropdown-footer--split {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.searchable-dropdown-add--subtle {
    opacity: 0.85;
    font-size: 0.8rem;
}

.searchable-dropdown-footer--hint {
    padding: var(--spacing-sm);
    color: var(--text-muted, #64748b);
    font-size: 0.8rem;
    text-align: center;
}



/* ---- _category-tree-picker.css ---- */
/* Category tree picker (ctp-*) — from CategoryTreePicker.vue */

.ctp {
  position: relative;
  width: 100%;
  --ctp-bg: var(--bg-primary, #fff);
  --ctp-panel-bg: var(--bg-secondary, #fff);
  --ctp-border: var(--border-color, #d1d5db);
  --ctp-text: inherit;
  --ctp-text-muted: var(--text-muted, #6b7280);
  --ctp-hover: var(--hover-bg, #f3f4f6);
  --ctp-accent: var(--accent-blue, #2563eb);
  --ctp-accent-soft: color-mix(in srgb, var(--ctp-accent) 14%, transparent);
  --ctp-link: var(--link-color, #2563eb);
  --ctp-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ctp--dark {
  --ctp-bg: var(--bg-primary, #0f172a);
  --ctp-panel-bg: var(--bg-secondary, #1e293b);
  --ctp-border: var(--border-primary, #475569);
  --ctp-text: var(--text-primary, #f1f5f9);
  --ctp-text-muted: var(--text-secondary, #94a3b8);
  --ctp-hover: var(--bg-tertiary, #334155);
  --ctp-accent: var(--accent-blue, #3b82f6);
  --ctp-accent-soft: color-mix(in srgb, var(--ctp-accent) 18%, transparent);
  --ctp-link: var(--accent-blue-hover, #60a5fa);
  --ctp-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.ctp-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  background: var(--ctp-bg);
  color: var(--ctp-text);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.ctp-trigger.ctp-trigger-large {
  padding: 0.6rem 0.6rem;
  border: none;
  background: var(--bg-input, var(--ctp-bg));
}

.ctp-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ctp-placeholder {
  color: var(--ctp-text-muted);
}

.ctp-caret {
  flex: 0 0 auto;
  opacity: 0.6;
}

.ctp-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: var(--ctp-panel-bg);
  border: 1px solid var(--ctp-border);
  border-radius: 8px;
  box-shadow: var(--ctp-shadow);
  padding: 0.35rem;
  color: var(--ctp-text);
}

.ctp-panel[hidden] {
  display: none !important;
}

.ctp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.4rem 0.4rem;
  font-size: 0.78rem;
  color: var(--ctp-text-muted);
  border-bottom: 1px solid var(--ctp-border);
  margin-bottom: 0.25rem;
}

.ctp-crumb {
  background: none;
  border: none;
  padding: 0;
  color: var(--ctp-link);
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}

.ctp-crumb-sep {
  opacity: 0.5;
}

.ctp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ctp-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
}

.ctp-item + .ctp-item {
  margin-top: 2px;
}

.ctp-row {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: none;
  background: none;
  border-radius: 0;
  color: var(--ctp-text);
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  min-width: 0;
  font-family: inherit;
}

.ctp-row:hover:not(:disabled) {
  background: var(--ctp-hover);
}

.ctp-selected {
  background: var(--ctp-accent-soft);
  color: var(--ctp-accent);
  font-weight: 600;
}

.ctp-disabled {
  cursor: default;
  color: var(--ctp-text-muted);
}

.ctp-row--clear {
  font-style: italic;
  color: var(--ctp-text-muted);
}

.ctp-back {
  flex: 1 1 auto;
  color: var(--ctp-text-muted);
  border-radius: 6px;
  margin-bottom: 0.15rem;
  width: 100%;
}

.ctp-drill {
  flex: 0 0 auto;
  width: 2.25rem;
  border: none;
  border-left: 1px solid var(--ctp-border);
  background: none;
  border-radius: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--ctp-text-muted);
  cursor: pointer;
}

.ctp-drill:hover {
  background: var(--ctp-hover);
  color: var(--ctp-accent);
}

.ctp-empty {
  padding: 0.6rem;
  font-size: 0.85rem;
  color: var(--ctp-text-muted);
}

.ctp-error {
  color: var(--accent-red, #ef4444);
}

.demo-picker-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}


/* ---- _group-multi-picker.css ---- */
/* Flat multi-select group picker (gmp-*) — shares ctp trigger/panel tokens */

.gmp {
  max-width: 28rem;
}

.gmp-panel {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gmp-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.1rem 0.25rem;
  border-bottom: 1px solid var(--ctp-border);
  margin-bottom: 0.15rem;
}

.gmp-search {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.38rem 0.55rem;
  border: 1px solid var(--ctp-border);
  border-radius: 6px;
  background: var(--ctp-bg);
  color: var(--ctp-text);
  font-size: 0.85rem;
  font-family: inherit;
}

.gmp-search:focus {
  outline: none;
  border-color: var(--ctp-accent);
}

.gmp-clear-btn {
  flex: 0 0 auto;
  border: none;
  background: none;
  color: var(--ctp-link);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
}

.gmp-clear-btn:hover {
  text-decoration: underline;
}

.gmp-list {
  max-height: 240px;
  overflow-y: auto;
}

.gmp-item {
  display: block;
}

.gmp-row {
  width: 100%;
}

.gmp-check {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--ctp-border);
  border-radius: 3px;
  background: var(--ctp-bg);
  font-size: 0.62rem;
  color: transparent;
}

.gmp-check--on {
  border-color: var(--ctp-accent);
  background: var(--ctp-accent);
  color: #fff;
}

.gmp-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ---- _zdesk-modal.css ---- */
/* Production zdesk-modal (Vue apps) — demo showcase */

.zdesk-modal[hidden],
.zdesk-modal.d-none {
  display: none !important;
}

.zdesk-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.zdesk-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.zdesk-modal__dialog {
  position: relative;
  width: min(640px, 92vw);
  max-height: 85vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  padding: 1rem;
}

.zdesk-modal__dialog--sm { width: min(440px, 92vw); max-height: 70vh; }
.zdesk-modal__dialog--lg { width: min(820px, 92vw); }
.zdesk-modal__dialog--xl { width: min(1000px, 94vw); max-height: 90vh; }
.zdesk-modal__dialog--xxl { width: min(1140px, 96vw); max-height: 92vh; }

.zdesk-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0 1rem 0;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.zdesk-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  color: var(--text-white);
}

.zdesk-modal__close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.25rem;
}

.zdesk-modal__close:hover {
  color: var(--text-primary);
}

.zdesk-modal__body {
  padding: 0;
  padding-right: 10px;
  margin-right: -10px;
  overflow: auto;
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.55;
}

.zdesk-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
}


/* ---- _server-status-card.css ---- */
/* Platform server status card (SaaS sidebar slot) */

.demo-server-status-wrap {
  max-width: 12rem;
}

.server-status-card {
  padding: 8px;
  /* border-radius: 8px;
  border: 1px solid var(--border-color, #30363d);
  background: var(--bg-secondary, #161b22); */
  display: grid;
  gap: 6px;
}

.server-status-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.server-status-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--text-muted, #8b949e);
}

.server-status-card__dot.is-ok { background: var(--accent-green, #22c55e); }
.server-status-card__dot.is-warn { background: var(--accent-amber, #f59e0b); }
.server-status-card__dot.is-bad { background: var(--accent-red, #ef4444); }

.server-status-card__title {
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary, #8b949e);
}

.server-status-card__health {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-secondary, #8b949e);
  white-space: nowrap;
}

.server-status-card__metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}

.server-status-card__metric-label {
  color: var(--text-secondary, #8b949e);
}

.server-status-card__metric-value {
  color: var(--text-primary, #e6edf3);
  font-variant-numeric: tabular-nums;
}

.server-status-card__services {
  display: grid;
  gap: 4px;
  padding-top: 2px;
}

.server-status-card__service-row {
  display: grid;
  grid-template-columns: auto 1.5rem 1fr;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary, #8b949e);
}

.server-status-card__service-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-muted, #8b949e);
}

.server-status-card__service-dot.is-ok { background: var(--accent-green, #22c55e); }
.server-status-card__service-dot.is-warn { background: var(--accent-amber, #f59e0b); }
.server-status-card__service-dot.is-bad { background: var(--accent-red, #ef4444); }


/* ---- _kit-primitives.css ---- */
/* ZelectKit feedback primitives (from Vue kit components) */

.zk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 6px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
}

.zk-badge--sm { padding: 2px 4px; font-size: 0.75rem; }
.zk-badge--md { padding: 4px 8px; font-size: 0.8125rem; }

.zk-badge--neutral { background: var(--bg-tertiary); color: var(--text-secondary); }
.zk-badge--accent { background: color-mix(in srgb, var(--accent-blue) 16%, transparent); color: var(--accent-blue); }
.zk-badge--success { background: color-mix(in srgb, var(--accent-green) 16%, transparent); color: var(--accent-green); }
.zk-badge--warning { background: color-mix(in srgb, var(--accent-amber) 16%, transparent); color: var(--accent-amber); }
.zk-badge--danger { background: color-mix(in srgb, var(--accent-red) 16%, transparent); color: var(--accent-red); }
.zk-badge--status-open { background: color-mix(in srgb, var(--accent-blue) 16%, transparent); color: var(--accent-blue); }
.zk-badge--status-pending { background: color-mix(in srgb, var(--accent-amber) 16%, transparent); color: var(--accent-amber); }
.zk-badge--prio-urgent { background: color-mix(in srgb, var(--accent-red) 16%, transparent); color: var(--accent-red); }
.zk-badge--solid.zk-badge--success { background: var(--accent-green); color: #fff; }

.zk-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
}

.zk-empty__icon {
  font-size: 1.75rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.zk-empty__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-white);
}

.zk-empty__message {
  margin: 0;
  max-width: 360px;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.zk-skel {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-elevated) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% 100%;
  border-radius: 6px;
  animation: demo-zk-skel-shimmer 1.4s linear infinite;
}

.zk-skel--text { height: 0.9em; width: 100%; display: block; }
.zk-skel--row { height: 2.5rem; width: 100%; display: block; border-radius: 8px; }
.zk-skel--block { height: 5rem; width: 100%; display: block; border-radius: 8px; }
.zk-skel--avatar { width: 28px; height: 28px; border-radius: 999px; display: inline-block; }

@keyframes demo-zk-skel-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.demo-zk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.demo-zk-skel-stack {
  display: grid;
  gap: 0.5rem;
  max-width: 22rem;
}

/* zk-error (Vue ZkErrorState) */
.zk-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--accent-red) 12%, var(--bg-primary));
  border: 1px solid color-mix(in srgb, var(--accent-red) 25%, transparent);
  border-radius: 12px;
}

.zk-error__icon {
  font-size: 1.75rem;
  color: var(--accent-red);
}

.zk-error__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-white);
}

.zk-error__message {
  margin: 0;
  max-width: 360px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.zk-error__actions { margin-top: 0.25rem; }

.zk-error__retry {
  appearance: none;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8125rem;
}

.zk-error__retry:hover { background: var(--bg-tertiary); }


/* ---- _queues.css ---- */
/* Soft Connect queue cards — Smart Connect metrics header + expandable agents */

.zel-queue-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.55rem;
  /* Don't stretch sibling cards when one expands */
  align-items: flex-start;
  margin-top: 0.15rem;
}

/* Cap at 2 columns so a lone 3rd card never stretches full row width */
.zel-queue-card {
  flex: 1 1 calc(50% - 0.275rem);
  width: calc(50% - 0.275rem);
  max-width: calc(50% - 0.275rem);
  min-width: min(100%, 14rem);
  box-sizing: border-box;
  border: 1px solid var(--border-secondary, var(--border-color));
  border-radius: var(--radius-md, 0.65rem);
  background: var(--bg-tertiary, var(--bg-primary));
  overflow: hidden;
}

@media (max-width: 720px) {
  .zel-queue-card {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
}

.zel-queue-card.is-open {
  border-color: color-mix(in srgb, var(--accent-blue, #3b82f6) 35%, var(--border-secondary));
}

.zel-queue-card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.5rem;
  align-items: center;
  width: 100%;
  padding: 0.65rem 0.65rem 0.65rem 1rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font-family: inherit;
}

.zel-queue-card__head-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.zel-queue-card__manage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--border-secondary, var(--border-color));
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.zel-queue-card__manage:hover {
  color: var(--accent-blue, #3b82f6);
  border-color: color-mix(in srgb, var(--accent-blue, #3b82f6) 40%, var(--border-secondary));
}

.zel-queue-agent__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.zel-queue-agent__remove:hover {
  color: var(--accent-red, #ef4444);
  background: color-mix(in srgb, var(--accent-red, #ef4444) 12%, transparent);
}

.zel-queue-card__title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.zel-queue-card__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent-green, #22c55e);
  flex-shrink: 0;
}

.zel-queue-card__dot--idle {
  background: var(--text-secondary);
}

.zel-queue-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zel-queue-card__metrics {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.zel-queue-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.zel-queue-metric i {
  font-size: 0.7rem;
  opacity: 0.85;
}

.zel-queue-card__body {
  border-top: none;
  padding: 0 0.45rem 0.5rem;
}

.zel-queue-agents {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.zel-queue-agent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem;
  border-radius: 0.45rem;
}

.zel-queue-agent__avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--accent-blue) 18%, transparent);
  color: var(--text-primary);
  flex-shrink: 0;
}

.zel-queue-agent__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.zel-queue-agent__name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  min-width: 0;
}

.zel-queue-agent__ext {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
  margin-left: auto;
}

.zel-queue-empty {
  padding: 0.65rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

.zel-presence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: capitalize;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  flex-shrink: 0;
  box-sizing: border-box;
}

.zel-presence--available {
  color: var(--accent-green, #22c55e);
  background: color-mix(in srgb, var(--accent-green) 14%, transparent);
}

.zel-presence--busy {
  color: var(--accent-amber, #f59e0b);
  background: color-mix(in srgb, var(--accent-amber) 14%, transparent);
}

.zel-presence--away,
.zel-presence--offline {
  color: var(--text-secondary);
}

.zel-presence-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md, 0.65rem);
  background: var(--bg-secondary);
  margin-bottom: 0.75rem;
}


/* ---- _cti-console.css ---- */
/* Soft Connect console — Smart Connect–style multi-pane layout */

.zel-cti-console {
  display: grid;
  grid-template-columns: minmax(17rem, 20rem) minmax(0, 1fr) minmax(16rem, 19rem);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
  width: 100%;
  /* Fill shell column (parent flex); floor at 40rem so tiny heights stay usable */
  flex: 1 1 auto;
  min-height: 40rem;
  height: 100%;
  max-height: 100%;
}

.zel-cti-pane--session { grid-column: 2; grid-row: 1; }
.zel-cti-pane--directory { grid-column: 3; grid-row: 1 / span 2; }
.zel-cti-pane--history { grid-column: 1; grid-row: 1 / span 2; }
.zel-cti-pane--queues { grid-column: 2; grid-row: 2; }

/* Dialer nests inside Call / My log / SMS session body (left) */
.zel-cti-pane__body--session {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.85rem;
  padding: 0.65rem;
}

.zel-cti-pane--session .zel-cti-pane--dialer {
  flex: 0 0 min(12rem, 38%);
  min-width: 10rem;
  max-width: 13.5rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.zel-cti-pane--session .zel-cti-pane--dialer .zel-cti-dialer {
  padding: 0.15rem 0.1rem;
}

.zel-cti-session-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.zel-cti-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-secondary, var(--border-color));
  border-radius: var(--radius-md, 0.75rem);
  overflow: hidden;
}

.zel-cti-pane__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem 0;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-muted, var(--border-secondary));
}

.zel-cti-pane__head .zel-cti-pane__tabs {
  border-bottom: 0;
  padding: 0;
  margin-bottom: -1px;
  flex: 1;
  min-width: 0;
}

.zel-cti-pane__head .cti-soft-sub.zel-badge {
  margin: 0 0 0 auto;
  align-self: center;
}

.zel-cti-pane__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.75rem;
}

.zel-cti-pane__tabs {
  display: flex;
  gap: 0.85rem;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-muted, var(--border-secondary));
  padding: 0 0.75rem;
  margin: 0;
  flex: 1;
}

.zel-cti-pane__tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary, var(--text-muted));
  font: inherit;
  font-size: 0.825rem;
  font-weight: 650;
  padding: 0.55rem 0.1rem 0.45rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.zel-cti-pane__tab.is-active {
  color: var(--accent-blue, #3b82f6);
  border-bottom-color: var(--accent-blue, #3b82f6);
}

.zel-cti-icon-btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: right;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.zel-cti-icon-btn:hover {
  color: var(--text-primary);
  background: transparent;
}

/* Dialer */
.zel-cti-dialer {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.zel-cti-dialer__input {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border-secondary);
  background: var(--bg-tertiary, var(--bg-primary));
  color: var(--text-primary);
}

.zel-cti-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.zel-cti-key {
  appearance: none;
  border: 1px solid var(--border-secondary);
  background: var(--bg-tertiary, var(--bg-primary));
  color: var(--text-primary);
  border-radius: 0.55rem;
  width: 100%;
  height: 2.25rem;
  min-height: 2.25rem;
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease;
}

.zel-cti-key:hover {
  background: color-mix(in srgb, var(--accent-blue) 12%, var(--bg-tertiary));
}

.zel-cti-key__digit {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.zel-cti-call-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  width: 11.5rem;
  height: 2rem;
  margin: 0.25rem auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-green, #22c55e);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-green, #22c55e) 22%, transparent);
}

.zel-cti-call-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Session / active call */
.zel-cti-session-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.zel-cti-session {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.zel-cti-session__identity {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-left: 2px;
}

.zel-cti-session__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05rem;
}

.zel-cti-session__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.zel-cti-session__phone {
  font-size: 0.95rem;
  color: var(--text-secondary);
  letter-spacing: 0.0275rem;
  min-width: 0;
}

.zel-cti-session__company {
  font-size: 0.85rem;
  color: var(--text-muted, var(--text-secondary));
  letter-spacing: 0.02rem;
  text-align: right;
  margin-left: auto;
  flex-shrink: 0;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zel-cti-session__addr {
  font-size: 0.75rem;
  color: var(--text-muted, var(--text-secondary));
}

.zel-cti-session__timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: -1.5rem 0 0;
}

.zel-cti-session__circle {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  border: 2px solid var(--border-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text-muted, var(--text-secondary));
  background: color-mix(in srgb, var(--text-muted, #6b7280) 12%, transparent);
}

.zel-cti-session__circle > i {
  display: inline-block;
  width: 1.35rem;
  height: 1.35rem;
  line-height: 1.35rem;
  text-align: center;
  font-style: normal;
}

.zel-cti-session__circle > i::before {
  display: inline-block;
  line-height: 1;
}

.zel-cti-session__circle--active {
  color: var(--accent-green, #22c55e);
  border-color: color-mix(in srgb, var(--accent-green, #22c55e) 45%, var(--border-secondary));
  background: color-mix(in srgb, var(--accent-green, #22c55e) 14%, transparent);
}

.zel-cti-session__circle--missed {
  color: var(--accent-red, #ef4444);
  border-color: color-mix(in srgb, var(--accent-red, #ef4444) 45%, var(--border-secondary));
  background: color-mix(in srgb, var(--accent-red, #ef4444) 14%, transparent);
}

.zel-cti-session__circle--previous {
  color: var(--text-muted, #9ca3af);
  border-color: color-mix(in srgb, var(--text-muted, #9ca3af) 35%, var(--border-secondary));
  background: color-mix(in srgb, var(--text-muted, #9ca3af) 12%, transparent);
}

.zel-cti-session__duration {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.zel-cti-session__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
  justify-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.zel-cti-session__stats strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.zel-cti-duration-bar {
  margin-top: 0.7rem;
  height: 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-blue) 50%, transparent);
  padding: 0;
}

.zel-cti-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  margin-top: 0.15rem;
}

.zel-cti-action {
  appearance: none;
  border: 0;
  border-radius: 0.55rem;
  padding: 0.35rem 0.95rem;
  letter-spacing: 0.0125rem;
  background: var(--bg-tertiary, var(--bg-primary));
  color: var(--text-primary);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.zel-cti-action:hover {
  filter: brightness(1.06);
}

.zel-cti-action--hangup {
  background: var(--accent-red, #ef4444);
  color: #fff;
}

.zel-cti-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.zel-cti-empty-session {
  padding: 1.5rem 0.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Agent / contact directory — 2 cols: avatar | (name row + actions row) */
.zel-cti-agent-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.65rem;
  row-gap: 0.3rem;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border-radius: 0.65rem;
  background: var(--bg-tertiary, var(--bg-primary));
  border: 1px solid var(--border-muted, transparent);
  margin-bottom: 0.45rem;
}

.zel-cti-agent-card__avatar {
  position: relative;
  grid-row: 1 / span 2;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-blue) 18%, transparent);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.zel-cti-status-badge {
  position: absolute;
  right: -0.2rem;
  bottom: 0rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #fff;
  background: var(--accent-green, #22c55e);
}

.zel-cti-status-badge--busy {
  background: var(--accent-red, #ef4444);
}

.zel-cti-status-badge--away {
  background: var(--accent-amber, #f59e0b);
}

.zel-cti-status-badge--offline {
  background: var(--text-secondary, #6b7280);
}

.zel-cti-agent-card__meta {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.zel-cti-agent-card__name {
  display: block;
  margin-left: 2px;
  font-size: 0.85rem;
  font-weight: 550;
  letter-spacing: 0.035rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zel-cti-agent-card__company {
  display: block;
  margin-left: 2px;
  margin-top: -0.175rem;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted, var(--text-secondary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Contacts: no avatar — single column */
.zel-cti-agent-card--contact {
  grid-template-columns: minmax(0, 1fr);
}

.zel-cti-agent-card--contact .zel-cti-agent-card__meta,
.zel-cti-agent-card--contact .zel-cti-agent-card__actions {
  grid-column: 1;
}

.zel-cti-agent-card__actions {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  place-content: space-between;
  gap: 0.35rem;
  min-width: 0;
}

.zel-cti-agent-card__phone,
.zel-cti-transfer-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--border-color, var(--bg-secondary));
  border: 1px solid var(--border-secondary);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted, var(--text-secondary));
  cursor: pointer;
  line-height: 1.2;
  max-width: 100%;
}

.zel-cti-agent-card__phone:hover,
.zel-cti-transfer-btn:hover {
  color: var(--text-primary);
}

.zel-cti-agent-card__phone:disabled,
.zel-cti-transfer-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.zel-cti-contact-row__call {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.05rem;
  padding: 0.35rem;
  flex-shrink: 0;
  line-height: 1;
  align-self: center;
}

.zel-cti-contact-row__call:hover {
  color: var(--accent-green, #22c55e);
}

.zel-cti-contact-row__call:disabled {
  opacity: 0.35;
  cursor: default;
}

/* My log rows */
.zel-cti-log-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--border-muted, var(--border-secondary));
}

.zel-cti-log-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.zel-cti-log-row__name {
  font-size: 0.85rem;
  font-weight: 550;
  letter-spacing: 0.035rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zel-cti-log-row__sub {
  font-size: 0.72rem;
  color: var(--text-muted, var(--text-secondary));
}

/* Incoming Calls wait cards */
.zel-cti-wait-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem 0.55rem;
  margin-bottom: 0.5rem;
  border-radius: 0.65rem;
  background: var(--bg-tertiary, var(--bg-primary));
  border: 1px solid transparent;
}

.zel-cti-wait-card:first-child {
  margin-top: 0.15rem;
}

.zel-cti-wait-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.zel-cti-wait-card__identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.zel-cti-wait-card__name {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.025rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zel-cti-wait-card__phone {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.78rem;
  color: var(--text-muted, var(--text-secondary));
}

.zel-cti-wait-card__phone-num {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zel-cti-wait-card__bar-label {
  margin-left: auto;
  flex-shrink: 0;
  text-align: right;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted, var(--text-secondary));
  white-space: nowrap;
}

.zel-cti-wait-card__bar {
  position: relative;
  height: 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 22%, transparent);
  overflow: hidden;
}

.zel-cti-wait-card__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-green, #14b8a6);
  transition: width 0.35s ease, background 0.2s ease;
}

.zel-cti-wait-card--ok .zel-cti-wait-card__bar-fill {
  background: var(--accent-green, #14b8a6);
}

.zel-cti-wait-card--warn .zel-cti-wait-card__bar-fill {
  background: var(--accent-amber, #eab308);
}

.zel-cti-wait-card--danger .zel-cti-wait-card__bar-fill {
  background: var(--accent-red, #ef4444);
}

.zel-cti-search {
  width: 100%;
  margin-top: 0.15rem;
  margin-bottom: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border-secondary);
  background: var(--bg-tertiary, var(--bg-primary));
  color: var(--text-primary);
  font: inherit;
  font-size: 0.8rem;
}

/* SMS compose */
.zel-cti-sms {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.zel-cti-sms__to {
  position: relative;
}

.zel-cti-sms__suggest {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 0.2rem);
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: 0.55rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 14rem;
  overflow: auto;
}

.zel-cti-sms__suggest li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-size: 0.8rem;
}

.zel-cti-sms__suggest li:hover {
  background: var(--bg-tertiary, var(--bg-primary));
}

.zel-cti-sms__suggest span {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.zel-cti-sms textarea {
  height: 134px;
  min-height: 134px;
  resize: vertical;
  border-radius: 0.55rem;
  border: 1px solid var(--border-secondary);
  background: var(--bg-tertiary, var(--bg-primary));
  color: var(--text-primary);
  padding: 0.65rem;
  font: inherit;
  font-size: 0.85rem;
}

.zel-cti-sms__actions {
  display: flex;
  justify-content: flex-end;
}

.zel-cti-sms__actions .zel-btn-primary {
  width: auto;
  min-width: 5.5rem;
}

/* Soft Connect chats */
.zel-cti-chat-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.45rem;
  border-radius: 0.65rem;
  background: var(--bg-tertiary, var(--bg-primary));
  cursor: pointer;
}

.zel-cti-chat-card:hover {
  border: 1px solid color-mix(in srgb, var(--accent-blue) 30%, transparent);
  padding: calc(0.65rem - 1px) calc(0.7rem - 1px);
}

.zel-cti-chat-card:first-child {
  margin-top: 0.15rem;
}

.zel-cti-chat-card__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--accent-blue) 18%, transparent);
  color: var(--text-primary);
  flex-shrink: 0;
}

.zel-cti-chat-card__main {
  min-width: 0;
}

.zel-cti-chat-card__top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

.zel-cti-chat-card__name {
  font-size: 0.85rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zel-cti-chat-card__when {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: auto;
  text-align: right;
}

.zel-cti-chat-card__preview {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zel-cti-chat-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.zel-cti-chat-card__sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Inline chat thread (iMessage-ish) */
.zel-cti-chat-thread {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 18rem;
  margin: -0.15rem 0 0;
}

.zel-cti-chat-thread__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0 0.55rem;
  border-bottom: 1px solid var(--border-muted, var(--border-secondary));
  flex-shrink: 0;
}

.zel-cti-chat-thread__back {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
}

.zel-cti-chat-thread__back:hover {
  color: var(--text-primary);
}

.zel-cti-chat-thread__title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.zel-cti-chat-thread__name {
  font-size: 0.9rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zel-cti-chat-thread__meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.zel-cti-chat-thread__messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0.15rem;
}

.zel-cti-chat-bubble {
  max-width: min(80%, 65rem);
  padding: 0.75rem 0.9rem 0.5rem;
  border-radius: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.zel-cti-chat-bubble--them {
  align-self: flex-start;
  background: var(--bg-tertiary, var(--bg-primary));
  border-bottom-left-radius: 0.35rem;
}

.zel-cti-chat-bubble--me {
  align-self: flex-end;
  background: color-mix(in srgb, var(--accent-blue, #3b82f6) 78%, transparent);
  border-bottom-right-radius: 0.35rem;
}

.zel-cti-chat-bubble__text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.zel-cti-chat-bubble__time {
  font-size: 0.62rem;
  opacity: 0.75;
  align-self: flex-end;
}

.zel-cti-chat-thread__composer {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-muted, var(--border-secondary));
  flex-shrink: 0;
}

.zel-cti-chat-thread__input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  min-height: 2.65rem;
  max-height: 9rem;
  border: 1px solid var(--border-secondary);
  border-radius: 1.1rem;
  padding: 0.7rem 0.95rem;
  background: var(--bg-tertiary, var(--bg-primary));
  color: var(--text-primary);
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.4;
  resize: none;
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  outline: none;
  box-shadow: none;
}

.zel-cti-chat-thread__input:focus,
.zel-cti-chat-thread__input:focus-visible {
  /* Override global :focus-visible ring from main/base.css */
  outline: none !important;
  outline-offset: 0;
  border-color: var(--border-secondary);
  box-shadow: none;
}

.zel-cti-chat-thread__send {
  appearance: none;
  border: 0;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: var(--accent-blue, #3b82f6);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.zel-cti-chat-thread__send:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Queues pane body fills when chat thread is open */
.zel-cti-pane--queues > .zel-cti-pane__body:has(.zel-cti-chat-thread) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.zel-cti-pane--queues > .zel-cti-pane__body:has(.zel-cti-chat-thread) .zel-cti-chat-thread {
  flex: 1;
  min-height: 0;
}

/* Queue log */
.zel-cti-qlog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.15rem;
  margin-bottom: 0.75rem;
}

.zel-cti-qlog-filters .floating-select,
.zel-cti-qlog-filters > :first-child {
  min-width: 11rem;
  flex: 0 1 14rem;
}

.zel-cti-qlog-filters__unanswered {
  margin-left: auto;
}

.zel-cti-qlog-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.45rem;
  border-radius: 0.65rem;
  background: var(--bg-tertiary, color-mix(in srgb, var(--bg-primary) 70%, var(--bg-secondary)));
  border: 1px solid transparent;
}

.zel-cti-qlog-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--text-muted) 18%, transparent);
  color: var(--text-muted);
  flex-shrink: 0;
}

.zel-cti-qlog-card__icon--missed {
  background: color-mix(in srgb, var(--accent-red) 30%, transparent);
  color: var(--text-muted, #9ca3af);
  font-size: 1rem;
}

.zel-cti-qlog-card__icon--ok {
  background: color-mix(in srgb, var(--text-muted) 14%, transparent);
  color: var(--text-muted);
}

.zel-cti-qlog-card__main {
  min-width: 0;
  margin-right: 0.5rem;
}

.zel-cti-qlog-card__top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

.zel-cti-qlog-card__title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zel-cti-qlog-card__phone {
  margin-left: 0.35rem;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted, var(--text-secondary));
}

.zel-cti-qlog-card__when {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.zel-cti-qlog-card__sub {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zel-cti-qlog-card__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.zel-cti-qlog-action {
  width: 2.15rem;
  height: 2.15rem;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.95rem;
  color: #fff;
}

.zel-cti-qlog-action--ok {
  background: color-mix(in srgb, var(--text-muted, #9ca3af) 55%, #6b7280);
}

.zel-cti-qlog-action--ok.is-answered {
  background: var(--accent-green, #22c55e);
  opacity: 1;
}

.zel-cti-qlog-action--call {
  background: var(--accent-green, #22c55e);
}

.zel-cti-qlog-action:disabled {
  opacity: 0.35;
  cursor: default;
}

.zel-cti-qlog-action--ok.is-answered:disabled {
  opacity: 1;
  cursor: default;
}

/* Devices modal content */
.zel-cti-devices {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.zel-cti-member-picker {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 22rem;
  overflow: auto;
}

.zel-cti-member-picker__row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.15rem;
  font-size: 0.9rem;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .zel-cti-console {
    grid-template-columns: minmax(16rem, 1fr) minmax(0, 1.4fr);
    grid-template-rows: auto auto;
  }

  .zel-cti-pane--history { grid-column: 1; grid-row: 1 / span 2; }
  .zel-cti-pane--session { grid-column: 2; grid-row: 1; }
  .zel-cti-pane--queues { grid-column: 2; grid-row: 2; }
  .zel-cti-console > .zel-cti-pane--directory {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 720px) {
  .zel-cti-console {
    grid-template-columns: 1fr;
  }

  .zel-cti-pane--history,
  .zel-cti-pane--session,
  .zel-cti-pane--queues,
  .zel-cti-pane--directory {
    grid-column: 1;
    grid-row: auto;
  }

  .zel-cti-pane__body--session {
    flex-direction: column;
  }

  .zel-cti-pane--session .zel-cti-pane--dialer {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
  }
}


/* ---- _v2-bulkbar.css ---- */
/* Ticket list bulk action bar (from app-v2.css) */

.v2-bulkbar {
  position: sticky;
  bottom: 0.85rem;
  z-index: 80;
  margin-top: 0.85rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-secondary) 92%, transparent);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}

.v2-bulkbar.show {
  display: flex;
}

.v2-bulkbar-count {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-white);
}

.v2-bulkbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}


/* ---- _settings-profile.css ---- */
/* --- Settings & Profile --- */
/* ===================== SETTINGS ===================== */
.zel-settings-panel { display: none; animation: fadeIn 0.2s ease; }
.zel-settings-panel.active { display: block; }

/* Tab panels for all pages */
.team-panel,
.billing-panel,
.integ-panel,
.ai-panel,
.support-panel,
.comms-panel,
.saticket-panel,
.infra-panel,
.devlog-panel,
.crm-panel,
.profile-panel { display: none; animation: fadeIn 0.2s ease; }

.team-panel.active,
.billing-panel.active,
.integ-panel.active,
.ai-panel.active,
.support-panel.active,
.comms-panel.active,
.saticket-panel.active,
.infra-panel.active,
.devlog-panel.active,
.crm-panel.active,
.profile-panel.active { display: block; }

.zel-form-section { margin-top: 0.5rem; }

.zel-settings-grid-5 {
  --bs-gutter-x: 0.75rem;
  --bs-gutter-y: 0.75rem;
}

.settings-fluid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.settings-fluid-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(11.875rem, 1fr));
}

.settings-span-2 {
  grid-column: span 2;
}

.zel-setting-field {
  height: 100%;
  padding: 0.9rem;
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.zel-setting-field .zel-label { margin-bottom: 0; }

.zel-setting-field .zel-input,
.zel-setting-field .zel-select {
  width: 100%;
}

.zel-setting-field-toggle {
  justify-content: space-between;
}

.zel-setting-field textarea.zel-input {
  min-height: 6.875rem;
}

.zel-setting-field-toggle .zel-toggle-label { font-size: 0.8rem; }
.zel-setting-field-toggle .zel-toggle-desc { font-size: 0.7rem; }
.zel-setting-field-toggle .zel-switch { margin-left: auto; }

.zel-danger-tile {
  height: 100%;
  padding: 0.9rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid rgba(218,54,51,0.15);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.zel-danger-tile .zel-btn-danger-outline {
  margin-top: auto;
}

.sa-health-table {
  display: grid;
  gap: 0.25rem;
}

.sa-health-table-head,
.sa-health-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 7.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.sa-health-table-head {
  padding: 0.15rem 0 0.35rem;
  color: var(--text-secondary);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-muted);
  margin-bottom: 0.25rem;
}

.sa-health-table-row {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-muted);
}

.sa-health-table-row:last-child { border-bottom: none; }
.sa-health-table-row span:last-child { text-align: right; white-space: nowrap; }

.sa-service-table {
  table-layout: fixed;
}

.sa-service-table th:nth-child(1),
.sa-service-table td:nth-child(1) { width: 34%; }
.sa-service-table th:nth-child(2),
.sa-service-table td:nth-child(2) { width: 14%; }
.sa-service-table th:nth-child(3),
.sa-service-table td:nth-child(3) { width: 30%; }
.sa-service-table th:nth-child(4),
.sa-service-table td:nth-child(4) { width: 22%; }
.sa-service-table td:empty::after { content: '\00a0'; }

.sa-service-name {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-white);
}

/* Auth method fields */
.zel-auth-fields { animation: fadeIn 0.2s ease; }

/* Danger items */
.zel-danger-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(218,54,51,0.15);
  gap: 1rem;
}
.zel-danger-item:last-child { border-bottom: none; }

/* Mini stats */
.zel-mini-stat {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}
.zel-mini-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--text-white); }
.zel-mini-stat-label { font-size: 0.7rem; color: var(--text-secondary); margin-top: 0; line-height: 1.35; }

/* Chart placeholder */
.zel-usage-chart-placeholder {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-height: 12.5rem;
}
.zel-usage-chart-placeholder > i { font-size: 1.25rem; color: var(--text-secondary); opacity: 0.4; }
.zel-usage-chart-placeholder > span { font-size: 0.75rem; color: var(--text-secondary); }

.zel-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex: 1;
  width: 100%;
  padding-top: 1rem;
}

.zel-chart-bar {
  flex: 1;
  background: rgba(35,134,54,0.25);
  border-radius: 3px 3px 0 0;
  min-height: 0.625rem;
  position: relative;
  transition: all 0.3s ease;
}
.zel-chart-bar.blue { background: rgba(31,111,235,0.25); }
.zel-chart-bar.red { background: rgba(218,54,51,0.35); }
.zel-chart-bar.active { background: rgba(35,134,54,0.5); }
.zel-chart-bar.blue.active { background: rgba(31,111,235,0.5); }

.zel-chart-bar span {
  position: absolute;
  bottom: -1.125rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: var(--text-secondary);
}

/* License gate */
.zel-license-gate {
  margin-top: 1rem;
  position: relative;
}

.zel-license-gate-inner {
  /* background: rgba(22,27,34,0.9); */
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  text-align: center;
}

.zel-license-gate-inner i { font-size: 1.5rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.zel-license-gate-inner h4 { font-size: 1rem; color: var(--text-white); margin-bottom: 0.35rem; }
.zel-license-gate-inner p { font-size: 0.825rem; color: var(--text-secondary); max-width: 400px; margin: 0 auto 1rem; }

/* ===================== PROFILE ===================== */
.zel-profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.zel-profile-name { font-size: 1.1rem; font-weight: 700; color: var(--text-white); }
.zel-profile-email { font-size: 0.8rem; color: var(--text-secondary); }

/* 2FA */
.zel-2fa-methods { display: flex; flex-direction: column; gap: 0.5rem; }

.zel-2fa-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm);
}

.zel-2fa-icon {
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--radius-sm);
  background: rgba(31,111,235,0.1);
  color: #58a6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.zel-2fa-method .zel-btn-outline { margin-left: auto; white-space: nowrap; }

/* Sessions */
.zel-session-list { display: flex; flex-direction: column; gap: 0.5rem; }

.zel-session-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-muted);
}
.zel-session-item:last-child { border-bottom: none; }

.zel-session-icon {
  width: 2rem; height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.zel-session-badge {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--accent-green);
  background: rgba(35,134,54,0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-top: 0.2rem;
  display: inline-block;
}

/* Info rows */
.zel-info-rows { display: flex; flex-direction: column; }

.zel-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-muted);
  font-size: 0.8rem;
}
.zel-info-row:last-child { border-bottom: none; }
.zel-info-label { color: var(--text-secondary); }
.zel-info-value { color: var(--text-primary); font-weight: 500; }

/* Study UID monospace */
.zel-uid {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-secondary);
  max-width: 11.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(0.25rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toast */
.zel-toast {
  position: fixed;
  top: calc(var(--topbar-height) + 0.75rem);
  right: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  font-size: 0.825rem;
  animation: slideDownToast 0.3s ease;
  max-width: 23.75rem;
}
.zel-toast.success { border-color: rgba(35,134,54,0.4); }
.zel-toast.success i { color: #3fb950; }
.zel-toast.error { border-color: rgba(218,54,51,0.4); }
.zel-toast.error i { color: #f85149; }

@keyframes slideDownToast {
  from { opacity: 0; transform: translateY(-0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive tweaks */
@media (max-width: 767.98px) {
  .settings-fluid-grid,
  .settings-fluid-grid--compact {
    grid-template-columns: 1fr;
  }

  .settings-span-2 {
    grid-column: span 1;
  }
}


/* ---- _security-sa.css ---- */
/* --- Security/IP Whitelist, Pagination, Super-Admin --- */
/* ===================== SECURITY / IP WHITELIST ===================== */
.zel-whitelist-add {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.zel-whitelist-current-ip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(31,111,235,0.06);
  border: 1px solid rgba(31,111,235,0.15);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.zel-whitelist-current-ip i { color: #58a6ff; }
.zel-whitelist-current-ip .zel-link-btn { margin-left: auto; white-space: nowrap; }

.zel-whitelist-ip-cell {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-white);
}

.zel-whitelist-remove {
  background: none;
  border: none;
  color: var(--accent-red);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: var(--transition);
}
.zel-whitelist-remove:hover { background: rgba(218,54,51,0.1); }

.zel-whitelist-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Rate-limit lockout banner */
.auth-lockout-banner {
  background: rgba(218,54,51,0.08);
  border: 1px solid rgba(218,54,51,0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #f85149;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.auth-lockout-banner i { font-size: 1rem; }
.auth-lockout-timer { font-weight: 700; font-family: monospace; }

/* Audit log event badges */
.zel-event-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.zel-event-badge.login { background: rgba(31,111,235,0.12); color: #58a6ff; }
.zel-event-badge.logout { background: rgba(130,80,255,0.12); color: #bc8cff; }
.zel-event-badge.failed { background: rgba(218,54,51,0.12); color: #f85149; }
.zel-event-badge.lockout { background: rgba(218,54,51,0.2); color: #f85149; }
.zel-event-badge.settings { background: rgba(210,153,34,0.12); color: var(--accent-amber); }
.zel-event-badge.security { background: rgba(35,134,54,0.12); color: #3fb950; }

.zel-pagination-info { font-size: 0.75rem; color: var(--text-secondary); }
.zel-pagination-btns { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.zel-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.7rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-sizing: border-box;
}
.zel-btn-smd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  padding: 0.4rem 0.65rem;
  min-height: 1rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-sizing: border-box;
  font-family: var(--font-family);
}
.zel-btn-sm i,
.zel-btn-smd i {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1em;
  margin: 0;
}
/* Trailing chevron in "Next >" stays tight to the label (not pushed to the button edge). */
.zel-btn-sm .fa-chevron-right,
.zel-btn-smd .fa-chevron-right,
.zel-btn-outline .fa-chevron-right {
  margin-left: 0;
  justify-content: flex-end;
}
.zel-btn-sm .fa-chevron-left,
.zel-btn-smd .fa-chevron-left,
.zel-btn-outline .fa-chevron-left {
  margin-right: 0;
  justify-content: flex-start;
}
.zel-table-footer > button {
  flex: 0 0 auto;
  width: auto;
}
.zel-btn-stripped {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 1.72rem !important;
  height: 1.72rem !important;
  font-size: 0.85rem !important;
  text-decoration: none !important;
  cursor: pointer !important;
  color: var(--text-secondary) !important;
  transition: var(--transition) !important;
  border-radius: var(--radius-sm, 6px) !important;
}
.zel-btn-stripped:hover:not(:disabled) {
  background: var(--bg-tertiary, rgba(148, 163, 184, 0.12)) !important;
  color: var(--text-primary) !important;
}
.zel-btn-stripped:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.zel-btn-md {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs, 0.35rem);
  padding: 0.35rem 0.5rem;
  min-height: 1.64rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
}
.zel-btn-outline.zel-btn-md:has(> i:only-child),
a.zel-btn-outline.zel-btn-md:has(> i:only-child) {
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}
.zel-btn-lg { padding: 0.5rem 1.1rem; }
.zel-btn-xl { padding: 0.75rem 1.25rem; }
.zel-btn-compact { padding: 0.25rem 0.5rem; }

/* Reusable utilities for incremental partial migrations */
.zel-hidden { display: none; }
.zel-pos-relative { position: relative; }
.zel-flex-row-center {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.zel-gap-8 { gap: 0.5rem; }
.zel-m0 { margin: 0; }
.zel-mb-sm { margin-bottom: 0.625rem; }

.zel-subcopy {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.zel-modal-content-md {
  max-width: 47.5rem;
  width: min(47.5rem, 94vw);
}

.zel-modal-content-lg {
  max-width: 56.25rem;
  width: min(56.25rem, 94vw);
}

.zel-pre-scroll-sm {
  white-space: pre-wrap;
  font-size: 0.8rem;
  max-height: 70vh;
  overflow: auto;
}

.zel-cell-muted {
  text-align: center;
  color: var(--text-secondary);
}

.zel-cell-muted-pad {
  text-align: center;
  padding: 1.25rem;
  color: var(--text-secondary);
}

.zel-inline-muted {
  opacity: 0.5;
}

.zel-inline-dim {
  font-size: 0.75rem;
  opacity: 0.6;
}

.zel-swatch-inline {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 0.375rem;
  background: var(--zel-swatch-color, #6b7280);
}

.zel-tabs-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border, var(--border-color));
  margin-bottom: -0.75rem;
  margin-top: -0.875rem;
}
.zel-btn-sm:disabled,
.zel-btn-smd:disabled { opacity: 0.4; cursor: not-allowed; }
.zel-btn-sm.zel-btn-primary,
.zel-btn-smd.zel-btn-primary { background: var(--accent-blue); color: #fff; border: 1px solid var(--accent-blue); }
.zel-btn-sm.zel-btn-outline,
.zel-btn-smd.zel-btn-outline { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); }
.zel-btn-sm.zel-btn-outline:hover:not(:disabled),
.zel-btn-smd.zel-btn-outline:hover:not(:disabled) { background: var(--bg-tertiary); color: var(--text-primary); }

/* ===================== SUPER-ADMIN ===================== */
/* SA Plan Distribution */
.sa-plan-dist { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem 0; }
.sa-plan-row { display: flex; align-items: center; gap: 0.75rem; }
.sa-plan-row .zel-badge { min-width: 5.625rem; justify-content: center; }
.sa-plan-bar-wrap { flex: 1; height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.sa-plan-bar { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.sa-plan-bar.green { background: var(--accent-green); }
.sa-plan-bar.blue { background: var(--accent-blue); }
.sa-plan-bar.purple { background: var(--accent-purple); }
.sa-plan-bar.amber { background: var(--accent-amber); }
.sa-plan-count { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); min-width: 1.875rem; text-align: right; }

/* SA Health */
.sa-health-rows { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.5rem 0; }
.sa-health-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border-muted); font-size: 0.8rem; }
.sa-health-row > span:first-child { flex: 1; min-width: 0; color: var(--text-primary); }
.sa-health-row > span:last-child, .sa-health-row > .zel-text-xs:last-child { text-align: right; white-space: nowrap; flex-shrink: 0; }
.sa-health-row > .zel-badge { flex-shrink: 0; }
.sa-health-row:last-child { border-bottom: none; }

/* SA Usage bar */
.sa-usage-bar { width: 100px; height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.sa-usage-fill { height: 100%; border-radius: 3px; }
.sa-usage-fill.green { background: var(--accent-green); }
.sa-usage-fill.amber { background: var(--accent-amber); }
.sa-usage-fill.red { background: var(--accent-red); }
.sa-usage-fill.blue { background: var(--accent-blue); }

/* SA Report panels */
.sa-report-panel { display: none; }
.sa-report-panel.active { display: block; }
.sa-plat-panel { display: none; }
.sa-plat-panel.active { display: block; }

.sa-plat-actions-right {
  justify-content: flex-end;
}

.sa-plat-defaults-grid {
  align-items: end;
}

.sa-plat-smtp-test-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.sa-plat-smtp-test-field {
  flex: 1 1 35rem;
  min-width: 17.5rem;
}

.sa-plat-smtp-test-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 1 auto;
  min-height: 2.375rem;
  padding-bottom: 0.0625rem;
}

.sa-plat-smtp-test-result {
  color: var(--text-secondary);
  line-height: 1.4;
}

.sa-plat-feature-group {
  margin-top: 1rem;
}

.sa-plat-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.sa-plat-feature-grid .zel-toggle-row {
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  min-height: 100%;
}

.sa-plat-feature-grid .zel-toggle-row:last-child {
  border-bottom: 1px solid var(--border-muted);
}

.sa-plat-feature-grid .zel-toggle-label {
  font-size: 0.8rem;
}

.sa-plat-feature-grid .zel-toggle-desc {
  font-size: 0.73rem;
  line-height: 1.5;
}

.sa-plat-grid {
  min-width: 53.75rem;
}

.sa-plat-grid thead th.sa-plat-th-number,
.sa-plat-grid tbody td.sa-plat-cell-number,
.sa-plat-grid tbody td.sa-plat-cell-action {
  text-align: center;
}

.sa-plat-grid tbody td.sa-plat-cell-label,
.sa-plat-grid tbody td.sa-plat-cell-key,
.sa-plat-grid tbody td.sa-plat-cell-status,
.sa-plat-grid tbody td.sa-plat-cell-support,
.sa-plat-grid tbody td.sa-plat-cell-usage,
.sa-plat-grid tbody td.sa-plat-cell-action {
  white-space: nowrap;
}

.sa-plat-grid .zel-input,
.sa-plat-grid .zel-select {
  margin: 0 auto;
}

.sa-plat-input-label {
  width: 8.25rem;
}

.sa-plat-input-key {
  width: 6.625rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.76rem;
}

.sa-plat-input-number {
  width: 5.25rem;
  text-align: center;
}

.sa-plat-input-number-wide {
  width: 6.75rem;
  text-align: center;
}

.sa-plat-input-measure {
  width: 5.75rem;
  text-align: center;
}

.sa-plat-input-support {
  width: 7.25rem;
}

.sa-plat-input-usage {
  width: 6.75rem;
}

.sa-plat-select-compact {
  width: 6.5rem;
  min-width: 6.5rem;
}

.sa-plat-cell-action {
  width: 1%;
}

@media (max-width: 1199.98px) {
  .sa-plat-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .sa-plat-actions-right {
    justify-content: flex-start;
  }

  .sa-plat-smtp-test-action {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* SA Bulk bar */
.sa-bulk-bar {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 0.5rem 2rem rgba(0,0,0,0.5);
  z-index: 1000;
}
.sa-bulk-count { font-size: 0.8rem; color: var(--text-primary); font-weight: 600; }

/* SA User detail panel */
.sa-user-detail { margin-top: 1rem; }

/* SA Filters row */
.zel-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.zel-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.zel-search-wrap i {
  position: absolute;
  left: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  pointer-events: none;
}
.zel-search-wrap .zel-input { padding-left: 2.25rem; }
.zel-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 0.5rem;
}

/* Default cursors */
p, span, h1, h2, h3, h4, h5, h6, label, div, li, td, th { cursor: default; }
a, button, [data-zel-page], .zel-nav-item, .zel-quick-action { cursor: pointer; }
input, textarea { cursor: text; }
select { cursor: pointer; }

/*
 * JS theme dropdowns / comboboxes (incl. searchable): the whole field + every
 * option row must be cursor:pointer. Global `input { cursor:text }` and
 * `span/div { cursor:default }` otherwise make the control feel broken.
 */
.zel-tenant-combo,
.zel-tenant-combo *,
.zel-tenant-item,
.zel-tenant-item *,
.zeldesk-fsel,
.zeldesk-fsel *,
.zeldesk-fsel-trigger,
.zeldesk-fsel-option,
.zeldesk-fsel-option *,
.zeldesk-fsel-search,
.ctp.ctp--dark,
.ctp-trigger,
.ctp-trigger *,
.ctp-row,
.ctp-row *,
.fsel-search,
.fsel-item,
.fsel-item *,
.cmp-trigger,
.cmp-trigger *,
.cmp-search,
.gmp-search,
.cmp-row,
.cmp-row *,
.gmp-row,
.gmp-row *,
.cmp-option,
.cmp-option *,
.ctp-option,
.ctp-option *,
.searchable-select-wrapper,
.searchable-select-wrapper *,
.searchable-select-wrapper input,
.searchable-dropdown-item,
.searchable-dropdown-item *,
.zel-prop-select,
.zel-prop-select *,
.zel-prop-select-trigger,
.zk-combo-trigger,
.zk-combo-trigger *,
.floating-select,
.floating-select * {
  cursor: pointer !important;
}


/* ---- _pages.css ---- */
/* --- New Page Styles, Company Switcher, Registration --- */
/* === NEW PAGE STYLES === */

/* Integration cards */
.integ-card { transition: border-color 0.2s; display: flex; flex-direction: column; height: 100%; }
.integ-card:hover { border-color: var(--accent-blue); }
.integ-card .integ-body { flex: 1; }
.integ-card-header { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.5rem; }
.integ-card-header-info { flex: 1; min-width: 0; }
.integ-card-status { margin-left: auto; text-align: right; flex-shrink: 0; }
.integ-card-status .zel-badge { white-space: nowrap; }
.integ-addon-price { font-size: 0.6rem; color: var(--accent-purple); margin-top: 0.1875rem; white-space: nowrap; }
.integ-addon-price i { font-size: 0.55rem; }
.integ-icon { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.integ-icon.green { background: rgba(35,134,54,0.15); color: var(--accent-green); }
.integ-icon.blue { background: rgba(31,111,235,0.15); color: var(--accent-blue); }
.integ-icon.purple { background: rgba(130,80,223,0.15); color: var(--accent-purple); }
.integ-icon.amber { background: rgba(210,153,34,0.15); color: var(--accent-amber); }

/* Pipeline / CRM */
.pipeline-col { min-height: 18.75rem; }
.pipeline-items { display: flex; flex-direction: column; gap: 0.5rem; }
.pipeline-card { background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 0.75rem; transition: border-color 0.2s; }
.pipeline-card:hover { border-color: var(--accent-blue); }

/* Knowledge base */
.kb-card { min-height: 10rem; }
.kb-list { list-style: none; padding: 0; margin: 0.5rem 0 0 0; }
.kb-list li { padding: 0.25rem 0; }
.kb-list li a { font-size: 0.75rem; }
.kb-article-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.75rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}
.kb-article-link:hover { color: var(--accent-blue-hover, #79b8ff); text-decoration: underline; }

/* === COMPANY SWITCHER === */
.zel-company-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.46rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-secondary);
  max-width: 13.75rem;
}
.zel-company-switcher:hover {
  border-color: var(--accent-blue);
  background: var(--bg-tertiary);
}
.zel-company-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  width: 6.25rem;
  min-width: 6.25rem;
  max-width: 6.25rem;
  flex: 0 0 6.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zel-company-panel {
  position: fixed;
  top: 3.25rem;
  right: 1rem;
  left: auto;
  width: 21.25rem;
  max-height: 28.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.zel-company-panel-header {
  padding: 0.75rem 1rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.zel-company-panel-header h6 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-white);
}
.zel-company-search-wrap {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.zel-company-search-wrap i {
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.zel-company-search {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.75rem;
  width: 100%;
}
.zel-company-list {
  overflow-y: auto;
  flex: 1;
  padding: 0.35rem;
  max-height: 20rem;
}
.zel-company-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.zel-company-item:hover {
  background: var(--bg-tertiary);
}
.zel-company-item.active {
  background: rgba(31,111,235,0.1);
  border: 1px solid rgba(31,111,235,0.25);
}
.zel-company-item-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--accent-blue);
  flex-shrink: 0;
}
.zel-company-item.active .zel-company-item-icon {
  background: rgba(31,111,235,0.15);
}
.zel-company-item-info {
  flex: 1;
  min-width: 0;
}
.zel-company-item-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zel-company-item-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}
.zel-company-panel-footer {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}
@media (max-width: 768px) {
  .zel-company-switcher { max-width: 2.75rem; gap: 0; padding: 0.35rem; }
  .zel-company-switcher .zel-company-name,
  .zel-company-switcher .fa-chevron-down { display: none; }
  .zel-company-panel { right: 0.625rem; width: calc(100vw - 1.25rem); max-width: 21.25rem; }
}

/* === REGISTRATION: DEPLOYMENT & PLAN PICKER === */
.reg-deploy-grid {
  display: flex;
  gap: 0.75rem;
}
.reg-deploy-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.reg-deploy-card:hover {
  border-color: var(--accent-blue);
  background: rgba(31,111,235,0.05);
}
.reg-deploy-card.active {
  border-color: var(--accent-blue);
  background: rgba(31,111,235,0.08);
}
.reg-deploy-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: rgba(31,111,235,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent-blue);
  flex-shrink: 0;
}
.reg-deploy-info {
  flex: 1;
  min-width: 0;
}
.reg-deploy-check {
  color: var(--accent-blue);
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.reg-deploy-card.active .reg-deploy-check {
  opacity: 1;
}

.reg-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-top: 0.5rem;
}
.reg-plan-card {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.85rem 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
}
.reg-plan-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-0.125rem);
}
.reg-plan-card.active {
  border-color: var(--accent-blue);
  background: rgba(31,111,235,0.06);
  box-shadow: 0 0 0 0.0625rem rgba(31,111,235,0.2);
}
.reg-plan-popular {
  position: absolute;
  top: -0.5625rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-blue);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.0625rem 0.5rem;
  border-radius: 0.5625rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03125rem;
}
.reg-plan-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.125rem 0.625rem;
  border-radius: 0.375rem;
  margin-bottom: 0.35rem;
}
.reg-plan-badge.green { background: rgba(34,197,94,0.15); color: var(--accent-green); }
.reg-plan-badge.blue { background: rgba(31,111,235,0.15); color: var(--accent-blue); }
.reg-plan-badge.purple { background: rgba(139,92,246,0.15); color: var(--accent-purple); }
.reg-plan-badge.amber { background: rgba(245,158,11,0.15); color: var(--accent-amber); }
.reg-plan-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-white);
  margin: 0.3rem 0 0.4rem;
}
.reg-plan-price span {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-secondary);
}
.reg-plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}
.reg-plan-features li {
  font-size: 0.68rem;
  color: var(--text-secondary);
  padding: 0.15rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.reg-plan-features li i.fa-check {
  color: var(--accent-green);
  font-size: 0.6rem;
}
.reg-plan-features li i.fa-xmark {
  font-size: 0.6rem;
}

@media (max-width: 992px) {
  .reg-plan-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .reg-deploy-grid { flex-direction: column; }
  .reg-plan-grid { grid-template-columns: 1fr; }
}


/* ---- _modals-kb.css ---- */
/* --- Modal System, KB Article Viewer, Scrollbar, Responsive --- */
/* === MODAL SYSTEM === */
.zel-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(0.25rem);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modalFadeIn 0.15s ease;
}
.zel-modal-overlay.d-none { display: none !important; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-0.75rem) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.zel-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 12px);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1.5rem 3rem rgba(0,0,0,0.35);
  animation: modalSlideIn 0.2s ease;
}
.zel-modal.modal-lg { max-width: 820px; }
.zel-modal.modal-xl { max-width: 1000px; }
.zel-modal.modal-xxl { max-width: 1140px; }
.zel-modal.modal-sm { max-width: 440px; }
.zel-modal.modal-tall-xs { max-height: 480px; }
.zel-modal.modal-tall-sm { max-height: 680px; }
.zel-modal.modal-tall-md { max-height: 720px; }
.zel-modal.modal-tall-lg { max-height: 1080px; }
.zel-modal.modal-tall-xl { max-height: min(1440px, 92vh); }
.zel-modal.modal-tall-xxl { max-height: min(2560px, 94vh); }
.zel-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.zel-modal-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.zel-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  line-height: 1;
}
.zel-modal-close:hover { color: var(--text-white); background: var(--bg-tertiary); }
.zel-btn-outline.zel-btn-sm {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.zel-btn-outline.zel-btn-sm:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.zel-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.zel-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}
.zel-modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.25rem;
  flex-shrink: 0;
}
.zel-modal-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.zel-modal-tab:hover { color: var(--text-white); }
.zel-modal-tab.active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); }
.zel-modal-panel { display: none; }
.zel-modal-panel.active { display: block; }
.zel-file-drop {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.zel-file-drop:hover { border-color: var(--accent-blue); background: rgba(31,111,235,0.03); }
.zel-modal-divider { border: none; border-top: 1px solid var(--border-color); margin: 0.75rem 0; }
.zel-modal-info {
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.zel-modal-info i { color: var(--accent-blue); margin-top: 0.125rem; }
.zel-modal-copy { margin: 0; font-size: 0.85rem; color: var(--text-primary); }
.zel-code-block {
  display: block;
  padding: 0.4rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-family: monospace;
  letter-spacing: 0.2em;
  color: var(--text-white);
}
.zel-code-input {
  font-family: monospace !important;
  letter-spacing: 0.4em !important;
  text-align: center !important;
}
.zel-qr-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
}
.zel-qr-shell {
  width: 11.25rem;
  height: 11.25rem;
  background: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem;
}

/* === KB ARTICLE VIEWER === */
.kb-article-viewer {
  display: none;
}
.kb-article-viewer.active {
  display: block;
}
.kb-categories.collapsed .kb-card {
  display: none;
}
.kb-categories.collapsed {
  display: none;
}
.kb-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.kb-breadcrumb a {
  color: var(--accent-blue);
  text-decoration: none;
  cursor: pointer;
}
.kb-breadcrumb a:hover { text-decoration: underline; }
.kb-article-body {
  line-height: 1.7;
  font-size: 0.78rem;
  color: var(--text-primary);
}
.kb-article-body h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-color);
}
.kb-article-body h3 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-white);
  margin: 1rem 0 0.35rem;
}
.kb-article-body p { margin: 0.4rem 0; }
.kb-article-body ul, .kb-article-body ol {
  padding-left: 1.25rem;
  margin: 0.4rem 0;
}
.kb-article-body li { margin: 0.2rem 0; }
.kb-article-body code {
  background: var(--bg-tertiary);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--accent-blue);
}
.kb-article-body pre {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  overflow-x: auto;
  font-size: 0.7rem;
  margin: 0.5rem 0;
}
.kb-article-body pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}
.kb-article-body .kb-callout {
  border-left: 3px solid var(--accent-blue);
  background: rgba(31,111,235,0.06);
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0.65rem 0;
  font-size: 0.72rem;
}
.kb-article-body .kb-callout.warning {
  border-left-color: var(--accent-amber);
  background: rgba(245,158,11,0.06);
}
.kb-article-body .kb-callout.success {
  border-left-color: var(--accent-green);
  background: rgba(34,197,94,0.06);
}
.kb-article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.kb-article-footer {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kb-article-helpful {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.kb-helpful-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.625rem;
  font-size: 0.68rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.kb-helpful-btn:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.kb-helpful-btn.selected { border-color: var(--accent-green); color: var(--accent-green); background: rgba(34,197,94,0.08); }



/* ---- _themes.css ---- */
/* ============================================
   Light-mode contrast fixes
   (moved out of demo.html — belong to the webkit)
   ============================================ */
:root[data-theme="light"] .zel-badge.blue   { background: rgb(29 211 216 / 41%); color: #004ac6; border: 1px solid rgba(29, 99, 216, 0.3); }
:root[data-theme="light"] .zel-badge.green  { background: rgb(75 255 0 / 44%); color: #19a540; border: 1px solid rgba(40, 182, 80, 0.426); }
:root[data-theme="light"] .zel-badge.amber  { background: rgb(255 208 0 / 34%); color: #ec6600; border: 1px solid rgba(255, 208, 0, 0.642); }
:root[data-theme="light"] .zel-badge.red    { background: rgb(255 0 18 / 76%); color: #ffffff; border: 1px solid rgba(207, 34, 46, 0.3); }
:root[data-theme="light"] .zel-badge.purple { background: rgb(94 0 255 / 33%); color: #4d00d2; border: 1px solid rgba(124, 58, 237, 0.3); }

:root[data-theme="light"] .zel-license-gate-inner    { background: var(--bg-tertiary) !important; border-color: var(--border-color) !important; }
:root[data-theme="light"] .zel-license-gate-inner h4 { color: var(--text-white); }
:root[data-theme="light"] .zel-license-gate-inner p  { color: var(--text-secondary); }
:root[data-theme="light"] .zel-license-gate-inner i  { color: var(--text-secondary); }

/* ============================================
   Zelect Theme — glossy, half-dark / half-purple
   Modern signature look. Activate with
       data-theme="zelect"  (data-bs-theme stays "dark")
   ============================================ */
:root[data-theme="zelect"] {
  /* Core surfaces — deep indigo/violet gradient base */
  --bg-primary:        #0b0718;
  --bg-secondary:      #140a2d;
  --bg-tertiary:       #1e1245;
  --bg-topbar-bg:      rgba(20, 10, 45, 0.78);
  --bg-inset:          #070311;

  /* Borders glow faintly purple */
  --border-color:      #3a2a6b;
  --border-muted:      #241646;

  /* Text */
  --text-primary:      #e5dcff;
  --text-secondary:    #a292d0;
  --text-white:        #faf7ff;

  /* Accents — richer purples, keep semantic colours */
  --accent-blue:       #8b5cf6;
  --accent-blue-hover: #a78bfa;
  --accent-green:      #22d3a5;
  --accent-green-hover:#34e3b5;
  --accent-red:        #f43f5e;
  --accent-amber:      #f59e0b;
  --accent-purple:     #c084fc;

  /* Fancier glossy shadows with purple bloom */
  --shadow-sm: 0 0.0625rem 0.1875rem rgba(10, 0, 30, 0.6), 0 0 0 0.0625rem rgba(139, 92, 246, 0.08);
  --shadow-md: 0 0.5rem 1.5rem rgba(10, 0, 30, 0.7), 0 0 2rem rgba(139, 92, 246, 0.10);
  --shadow-lg: 0 1.125rem 3rem rgba(10, 0, 30, 0.85), 0 0 4rem rgba(168, 85, 247, 0.18);

  color-scheme: dark;
}

/* Glossy body — radial purple bloom on a dark base */
:root[data-theme="zelect"] body {
  background:
    radial-gradient(75rem 37.5rem at 85% -10%,  rgba(168, 85, 247, 0.22), transparent 60%),
    radial-gradient(56.25rem 31.25rem  at -10% 110%, rgba(59, 130, 246, 0.15), transparent 60%),
    linear-gradient(160deg, #0b0718 0%, #140a2d 55%, #0b0718 100%);
  background-attachment: fixed;
}

/* Frosted topbar */
:root[data-theme="zelect"] .zel-topbar {
  background: linear-gradient(180deg, rgba(30, 18, 69, 0.85), rgba(20, 10, 45, 0.65));
  backdrop-filter: blur(0.875rem) saturate(140%);
  -webkit-backdrop-filter: blur(0.875rem) saturate(140%);
  border-bottom: 1px solid rgba(139, 92, 246, 0.18);
}

/* Sidebar with subtle purple sheen */
:root[data-theme="zelect"] .zel-sidebar {
  background: linear-gradient(180deg, rgba(20, 10, 45, 0.92), rgba(11, 7, 24, 0.92));
  border-right: 1px solid rgba(139, 92, 246, 0.18);
}
:root[data-theme="zelect"] .zel-nav-item.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(59, 130, 246, 0.14));
  color: var(--text-white);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.35);
}

/* Glossy cards: gradient background + hairline inner highlight */
:root[data-theme="zelect"] .zel-card,
:root[data-theme="zelect"] .zel-stat-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 55%),
    linear-gradient(160deg, #1a1040 0%, #120a2b 100%);
  border: 1px solid rgba(139, 92, 246, 0.22);
  box-shadow: var(--shadow-md);
  position: relative;
}
:root[data-theme="zelect"] .zel-card::before,
:root[data-theme="zelect"] .zel-stat-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 30%);
}

/* Primary buttons get a glossy purple gradient */
:root[data-theme="zelect"] .zel-btn-primary,
:root[data-theme="zelect"] .auth-btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: 1px solid rgba(168, 85, 247, 0.55);
  box-shadow: 0 0.375rem 1.125rem rgba(139, 92, 246, 0.35), inset 0 0.0625rem 0 rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
:root[data-theme="zelect"] .zel-btn-primary:hover,
:root[data-theme="zelect"] .auth-btn-primary:hover {
  background: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
}

/* Inputs — glassy */
:root[data-theme="zelect"] .auth-input-wrap,
:root[data-theme="zelect"] .zel-input,
:root[data-theme="zelect"] .zel-select,
:root[data-theme="zelect"] .zel-textarea {
  background: var(--bg-secondary);
  border: 1px solid rgba(139, 92, 246, 0.28);
  backdrop-filter: blur(0.375rem);
  -webkit-backdrop-filter: blur(0.375rem);
}
:root[data-theme="zelect"] .auth-input-wrap:focus-within {
  border-color: #a78bfa;
  box-shadow: 0 0 0 0.1875rem rgba(168, 85, 247, 0.22);
}

/* Tabs underline in signature purple */
:root[data-theme="zelect"] .zel-tab.active {
  color: var(--text-white);
  border-bottom-color: var(--accent-purple);
}

/* Connection banner */
:root[data-theme="zelect"] .zel-connection-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(139, 92, 246, 0.25);
}


/* ============================================
   Theme switcher — small dropdown attached to
   an icon button in the topbar.
   Markup:
       <div class="zel-theme-switch">
         <button class="zel-icon-btn" data-theme-toggle>…</button>
         <div class="zel-theme-menu" role="menu" hidden>
           <button class="zel-theme-option" data-theme="light">…</button>
           …
         </div>
       </div>
   ============================================ */
.zel-theme-switch {
  position: relative;
  display: inline-flex;
}

.zel-theme-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 11.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.35rem;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.zel-theme-menu[hidden] { display: none; }

.zel-theme-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.7rem;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: var(--font-family);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}
.zel-theme-option:hover {
  background: var(--bg-tertiary);
  color: var(--text-white);
}
.zel-theme-option .zel-theme-swatch {
  width: 1.125rem; height: 1.125rem;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 0.125rem rgba(255, 255, 255, 0.06);
}
.zel-theme-option[data-theme="light"]  .zel-theme-swatch { background: linear-gradient(135deg, #ffffff, #d5dee8); }
.zel-theme-option[data-theme="zelnight"] .zel-theme-swatch { background: linear-gradient(135deg, #4d90e6 0%, #1a1f28 70%); border-color: #4d90e6; box-shadow: 0 0 0.5rem rgba(77, 144, 230, 0.45); }
.zel-theme-option[data-theme="zelect"] .zel-theme-swatch {
  background:
    radial-gradient(circle at 30% 30%, #c084fc 0%, #8b5cf6 40%, #1e1245 75%, #0b0718 100%);
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0.625rem rgba(168, 85, 247, 0.55), inset 0 0 0 0.125rem rgba(255, 255, 255, 0.08);
}
.zel-theme-option .zel-theme-label { flex: 1; }
.zel-theme-option .zel-theme-check {
  font-size: 0.75rem;
  color: var(--accent-purple);
  opacity: 0;
}
.zel-theme-option.active {
  background: var(--bg-tertiary);
  color: var(--text-white);
  border-color: var(--border-color);
}
.zel-theme-option.active .zel-theme-check { opacity: 1; }

/* Fancy glossy-purple badge variant for topbar/page-header theme label */
.zel-badge.zelect {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(99, 102, 241, 0.22));
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 0.625rem rgba(168, 85, 247, 0.25);
}
:root[data-theme="light"] .zel-badge.zelect {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(99, 102, 241, 0.14));
  color: #5b21b6;
  border: 1px solid rgba(139, 92, 246, 0.45);
}


/* ============================================
   Zelgrey Theme — lighter glossy sibling of Zelect
   Light-blue / light-grey / white with a soft sheen.
   Activate with  data-theme="zelgrey"
   (data-bs-theme stays "light")
   ============================================ */
:root[data-theme="zelgrey"] {
  --bg-primary:        #f4f7fb;
  --bg-secondary:      #ffffff;
  /* --bg-tertiary:       #eaf1f9; */
  --bg-tertiary:       #f3f9ff;
  --bg-topbar-bg:      rgba(255, 255, 255, 0.82);
  --bg-inset:          #e2eaf4;

  --border-color:      #cfdbe8;
  --border-muted:      #e3ebf3;

  --text-primary:      #1e293b;
  --text-secondary:    #64748b;
  --text-white:        #0f172a;

  --accent-blue:       #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-green:      #10b981;
  --accent-green-hover:#059669;
  --accent-red:        #ef4444;
  --accent-amber:      #f59e0b;
  --accent-purple:     #8b5cf6;

  --shadow-sm: 0 0.0625rem 0.125rem rgba(15, 23, 42, 0.06), 0 0 0 0.0625rem rgba(59, 130, 246, 0.05);
  --shadow-md: 0 0.625rem 1.625rem rgba(15, 23, 42, 0.08), 0 0 1.75rem rgba(59, 130, 246, 0.06);
  --shadow-lg: 0 1.375rem 3.375rem rgba(15, 23, 42, 0.12), 0 0 3.75rem rgba(59, 130, 246, 0.10);

  color-scheme: light;
}

:root[data-theme="zelgrey"] body {
  background:
    radial-gradient(68.75rem 37.5rem at 85% -10%,  rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(56.25rem 31.25rem  at -10% 110%, rgba(148, 163, 184, 0.18), transparent 60%),
    linear-gradient(160deg, #f4f7fb 0%, #ffffff 55%, #eaf1f9 100%);
  background-attachment: fixed;
}

:root[data-theme="zelgrey"] .zel-topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 251, 0.75));
  backdrop-filter: blur(0.875rem) saturate(140%);
  -webkit-backdrop-filter: blur(0.875rem) saturate(140%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.14);
}

:root[data-theme="zelgrey"] .zel-sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(234, 241, 249, 0.92));
  border-right: 1px solid rgba(59, 130, 246, 0.12);
}
:root[data-theme="zelgrey"] .zel-nav-item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(147, 197, 253, 0.14));
  color: var(--text-white);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.3);
}

:root[data-theme="zelgrey"] .zel-card,
:root[data-theme="zelgrey"] .zel-stat-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(244, 247, 251, 0.85) 100%);
  border: 1px solid rgba(59, 130, 246, 0.14);
  box-shadow: var(--shadow-md);
  position: relative;
}
:root[data-theme="zelgrey"] .zel-card::before,
:root[data-theme="zelgrey"] .zel-stat-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 25%);
}

:root[data-theme="zelgrey"] .zel-btn-primary,
:root[data-theme="zelgrey"] .auth-btn-primary {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  border: 1px solid rgba(59, 130, 246, 0.55);
  box-shadow: 0 0.375rem 1rem rgba(59, 130, 246, 0.25), inset 0 0.0625rem 0 rgba(255, 255, 255, 0.4);
  color: #ffffff;
}
:root[data-theme="zelgrey"] .zel-btn-primary:hover,
:root[data-theme="zelgrey"] .auth-btn-primary:hover {
  background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
}

:root[data-theme="zelgrey"] .auth-input-wrap,
:root[data-theme="zelgrey"] .zel-input,
:root[data-theme="zelgrey"] .zel-select,
:root[data-theme="zelgrey"] .zel-textarea {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.22);
  backdrop-filter: blur(0.375rem);
  -webkit-backdrop-filter: blur(0.375rem);
}
:root[data-theme="zelgrey"] .auth-input-wrap:focus-within {
  border-color: #60a5fa;
  box-shadow: 0 0 0 0.1875rem rgba(96, 165, 250, 0.22);
}

:root[data-theme="zelgrey"] .zel-tab.active {
  color: var(--text-white);
  border-bottom-color: var(--accent-blue);
}
:root[data-theme="zelgrey"] .zel-connection-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.10), rgba(148, 163, 184, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.22);
}

/* Zelgrey theme-switcher swatch */
.zel-theme-option[data-theme="zelgrey"] .zel-theme-swatch {
  background:
    radial-gradient(circle at 30% 30%, #ffffff 0%, #dbeafe 35%, #93c5fd 75%, #3b82f6 100%);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 0.625rem rgba(59, 130, 246, 0.3), inset 0 0 0 0.125rem rgba(255, 255, 255, 0.4);
}

/* Zelgrey badge variant for theme label */
:root[data-theme="zelgrey"] .zel-badge.zelgrey {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(203, 213, 225, 0.25));
  color: var(--bs-indigo)!important;
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 0.5rem rgba(59, 130, 246, 0.15);
}
:root[data-theme="zelnight"] .zel-badge.zelgrey,
:root[data-theme="zelect"] .zel-badge.zelgrey {
  background: linear-gradient(135deg, rgba(147, 197, 253, 0.2), rgba(148, 163, 184, 0.22));
  border: 1px solid rgba(147, 197, 253, 0.4);
}
:root[data-theme="zelect"] .zel-badge.zelgrey {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(99, 102, 241, 0.22));
  color: var(--bs-indigo)!important;
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 0.625rem rgba(168, 85, 247, 0.25);
}
:root[data-theme="zelnight"] .zel-badge.zelect {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(147, 197, 253, 0.14));
  color: var(--bs-indigo)!important;
  border: 1px solid rgba(59, 130, 246, 0.45);
}


/* ============================================
   Extra helpers referenced by the demo
   (all themeable via existing tokens)
   ============================================ */

/* Icon-only round button (e.g. topbar "+" adder) */
.zel-btn-icon {
  width: 2.125rem; height: 2.125rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}
.zel-btn-icon:hover { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.zel-btn-icon.zel-btn-primary {
  background: var(--accent-blue); color: #fff; border-color: var(--accent-blue);
}
.zel-btn-icon.zel-btn-primary:hover { background: var(--accent-blue-hover); border-color: var(--accent-blue-hover); }

/* Ghost / subtle button */
.zel-btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.zel-btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-white); }

/* Success button */
.zel-btn-success {
  background: var(--accent-green);
  color: #fff;
  border: 1px solid var(--accent-green);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.zel-btn-success:hover { background: var(--accent-green-hover); border-color: var(--accent-green-hover); }

/* ============================================
   Tenant switcher (topbar) — search-as-trigger combobox
   ============================================ */
.zel-tenant-switch {
  position: relative;
  display: inline-flex;
}

/* The combo field itself acts as the trigger. Clicking anywhere on it
   focuses the input; typing filters the list below. */
.zel-tenant-combo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  width: 16.25rem;
  transition: var(--transition);
  cursor: pointer;
}
.zel-tenant-combo:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-blue);
}
.zel-tenant-combo:focus-within {
  background: var(--bg-secondary);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 0.1875rem rgba(31, 111, 235, 0.18);
  color: var(--text-white);
}
.zel-tenant-combo[aria-expanded="true"] {
  background: var(--bg-secondary);
  border-color: var(--accent-blue);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.zel-tenant-icon-lead {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem; height: 1.375rem;
  border-radius: var(--radius-sm);
  background: rgba(31, 111, 235, 0.14);
  color: var(--accent-blue);
  font-size: 0.78rem;
  flex-shrink: 0;
}
.zel-tenant-combo-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}
.zel-tenant-combo-input:-webkit-autofill,
.zel-tenant-combo-input:-webkit-autofill:hover,
.zel-tenant-combo-input:-webkit-autofill:focus {
  -webkit-text-fill-color: inherit;
  transition: background-color 99999s ease-out;
}
.zel-tenant-combo,
.zel-tenant-combo *,
.zel-tenant-item,
.zel-tenant-item * {
  cursor: pointer;
}
.zel-tenant-combo-input::placeholder { color: var(--text-secondary); font-weight: 500; }
.zel-tenant-combo-badge { flex-shrink: 0; }
.zel-tenant-combo-caret {
  font-size: 0.6rem; color: var(--text-secondary); flex-shrink: 0;
  transition: transform var(--transition);
}
.zel-tenant-combo[aria-expanded="true"] .zel-tenant-combo-caret { transform: rotate(180deg); }

.zel-tenant-menu {
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  left: 0;
  min-width: 16.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-blue);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 250;
  overflow: hidden;
}
.zel-tenant-menu[hidden] { display: none; }
.zel-tenant-list {
  max-height: 21.25rem; overflow-y: auto;
  padding: 0.25rem;
}
.zel-tenant-list-empty {
  padding: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.zel-tenant-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.zel-tenant-item:hover { background: var(--bg-tertiary); color: var(--text-white); }
.zel-tenant-item.active { background: var(--bg-tertiary); }
.zel-tenant-item.active .zel-tenant-check { opacity: 1; }
.zel-tenant-item .zel-tenant-icon {
  width: 2rem; height: 2rem;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  flex: 0 0 auto;
}
.zel-tenant-item .zel-tenant-icon.purple { background: rgba(139,92,246,0.15); color: var(--accent-purple); }
.zel-tenant-item-body { flex: 1; min-width: 0; }
.zel-tenant-item-name {
  font-size: 0.8rem; font-weight: 600; color: var(--text-white);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.zel-tenant-item-meta {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.68rem; color: var(--text-secondary);
  margin-top: 0.1rem;
}
.zel-tenant-check {
  color: var(--accent-green);
  font-size: 0.8rem;
  opacity: 0;
}
.zel-tenant-footer {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 0.4rem;
}
.zel-tenant-footer i { color: var(--accent-red); }

@media (max-width: 991.98px) {
  .zel-tenant-switch {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 280px;
  }

  .zel-tenant-combo {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 767.98px) {
  .zel-tenant-switch {
    flex: 0 0 auto;
    max-width: none;
  }

  .zel-tenant-combo {
    width: 2.125rem;
    min-width: 2.125rem;
    height: 2.125rem;
    padding: 0;
    gap: 0;
    justify-content: center;
  }

  .zel-tenant-icon-lead {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.7rem;
  }

  .zel-tenant-combo-input {
    display: none;
  }

  .zel-tenant-combo-badge,
  .zel-tenant-combo-caret {
    display: none;
  }

  .zel-tenant-menu {
    position: fixed;
    top: calc(var(--topbar-height) + 0.375rem);
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    min-width: 0;
    border-radius: var(--radius-md);
    border-top: 1px solid var(--accent-blue);
  }
}

@media (max-width: 575.98px) {
  .zel-tenant-combo-caret {
    display: none;
  }
}


/* ============================================
   Module / integration cards
   (used by Modules panel and elsewhere)
   ============================================ */
.zel-module-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  transition: var(--transition);
  height: 100%;
}
.zel-module-card:hover { border-color: var(--accent-blue); box-shadow: var(--shadow-md); }
.zel-module-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.zel-module-card-icon {
  width: 2.75rem; height: 2.75rem;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex: 0 0 auto;
}
.zel-module-card-icon.blue   { background: rgba(31, 111, 235, 0.14); color: var(--accent-blue); }
.zel-module-card-icon.green  { background: rgba(34, 197, 94, 0.14);  color: var(--accent-green); }
.zel-module-card-icon.purple { background: rgba(139, 92, 246, 0.14); color: var(--accent-purple); }
.zel-module-card-icon.amber  { background: rgba(245, 158, 11, 0.14); color: var(--accent-amber); }
.zel-module-card-icon.red    { background: rgba(239, 68, 68, 0.14);  color: var(--accent-red); }
.zel-module-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
}
.zel-module-card-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}
.zel-module-card-status {
  margin-left: auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem;
  font-size: 0.68rem; color: var(--text-secondary);
  white-space: nowrap;
}
.zel-module-card-body {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.zel-module-card-actions {
  margin-top: auto;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  align-items: center;
}
.zel-module-price {
  font-size: 0.68rem;
  color: var(--accent-purple);
  display: inline-flex; align-items: center; gap: 0.25rem;
}


/* ============================================
   Donut chart (pure CSS using conic-gradient)
   Set --pct and --c on the element, then place .zel-donut-label inside.
   ============================================ */
.zel-donut {
  --size: 8.75rem;
  --thickness: 0.875rem;
  --pct: 0;
  --c: var(--accent-blue);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    conic-gradient(var(--c) calc(var(--pct) * 1%), var(--bg-tertiary) 0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 0 0 auto;
}
.zel-donut::after {
  content: "";
  position: absolute;
  inset: var(--thickness);
  border-radius: 50%;
  background: var(--bg-secondary);
}
.zel-donut-label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.zel-donut-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1;
}
.zel-donut-caption {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.zel-donut-legend {
  display: flex; flex-direction: column; gap: 0.35rem;
  font-size: 0.75rem;
}
.zel-donut-legend-item {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--text-primary);
}
.zel-donut-legend-swatch {
  width: 10px; height: 10px; border-radius: 2px;
  flex: 0 0 auto;
}


/* ============================================
   Funnel list (conversion funnel)
   ============================================ */
.zel-funnel-list {
  display: flex; flex-direction: column; gap: 0.15rem;
}
.zel-funnel-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border-muted);
  font-size: 0.82rem;
  color: var(--text-primary);
}
.zel-funnel-row:last-child { border-bottom: none; }
.zel-funnel-row .zel-funnel-count {
  min-width: 2.125rem;
  text-align: center;
  background: var(--bg-tertiary);
  color: var(--text-white);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.5rem;
}
.zel-funnel-row .zel-funnel-count.blue { background: rgba(31,111,235,0.2); color: var(--accent-blue); }
.zel-funnel-row .zel-funnel-count.green { background: rgba(34,197,94,0.2); color: var(--accent-green); }
.zel-funnel-row .zel-funnel-count--muted { background: transparent !important; color: var(--text-primary) !important; font-weight: 400 !important; }


/* ============================================
   Health table (Service / Status / Latency-Notes)
   Reuses existing sa-health-table but adds
   a 4-column variant used on the Modules panel.
   ============================================ */
.sa-health-table-4 .sa-health-table-head,
.sa-health-table-4 .sa-health-table-row {
  grid-template-columns: 2fr 1fr 2fr 2fr !important;
}



/* ============================================
   Table variants — compact / striped / key-value / tree
   ============================================ */
.zel-checkbox {
  appearance: none; -webkit-appearance: none;
  width: 1rem; height: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: var(--bg-tertiary);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  flex-shrink: 0;
  align-self: center;
}
.zel-checkbox:checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}
.zel-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.22rem;
  height: 0.42rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -58%) rotate(45deg);
}
.zel-checkbox:focus-visible {
  outline: 0.125rem solid rgba(31, 111, 235, 0.45);
  outline-offset: 0.125rem;
}

.zel-icon-btn-sm {
  width: 1.625rem; height: 1.625rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.zel-icon-btn-sm:hover {
  background: var(--bg-tertiary);
  color: var(--text-white);
  border-color: var(--border-color);
}

/* Compact table — tighter vertical rhythm */
.zel-table.zel-table-compact th,
.zel-table.zel-table-compact td {
  padding: 0.35rem 0.55rem;
  font-size: 0.76rem;
}

/* Striped — zebra rows */
.zel-table.zel-table-striped tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}
:root[data-theme="light"] .zel-table.zel-table-striped tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.025);
}

/* Key-value — 4-column label/value/label/value layout */
.zel-table.zel-table-kv th {
  width: 18%;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
}
.zel-table.zel-table-kv td {
  color: var(--text-white);
  font-weight: 500;
}
.zel-table.zel-table-kv td + th {
  border-left: 1px solid var(--border-color);
  padding-left: 1rem;
}

/* Inline sparkline — 7-bar mini chart using CSS vars */
.zel-sparkline {
  display: inline-flex;
  align-items: flex-end;
  position: relative;
  height: 1.375rem;
  width: 2.75rem;
  gap: 0.125rem;
  padding: 0;
  background: transparent;
  vertical-align: middle;
}
.zel-sparkline::after { content: none; }
.zel-sparkline::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(to top, var(--col, var(--accent-blue)) 0 100%) left    bottom / 0.25rem calc(var(--a, 20) * 1%) no-repeat,
    linear-gradient(to top, var(--col, var(--accent-blue)) 0 100%) 17%     bottom / 0.25rem calc(var(--b, 30) * 1%) no-repeat,
    linear-gradient(to top, var(--col, var(--accent-blue)) 0 100%) 34%     bottom / 0.25rem calc(var(--c, 40) * 1%) no-repeat,
    linear-gradient(to top, var(--col, var(--accent-blue)) 0 100%) 50%     bottom / 0.25rem calc(var(--d, 50) * 1%) no-repeat,
    linear-gradient(to top, var(--col, var(--accent-blue)) 0 100%) 67%     bottom / 0.25rem calc(var(--e, 60) * 1%) no-repeat,
    linear-gradient(to top, var(--col, var(--accent-blue)) 0 100%) 84%     bottom / 0.25rem calc(var(--f, 70) * 1%) no-repeat,
    linear-gradient(to top, var(--col, var(--accent-blue)) 0 100%) right   bottom / 0.25rem calc(var(--g, 80) * 1%) no-repeat;
  opacity: 0.9;
  border-radius: 1px;
}


/* =============================================================
   1. ZELEEN — "Graphite Editorial"
   Sharp, crisp, zero blur. Ink-charcoal base with emerald lead.
   Feels like a premium newspaper app on a Retina screen.
   ============================================================= */
:root[data-theme="zeleen"] {
  --bg-primary:        #1a1d21;
  --bg-secondary:      #22262b;
  --bg-tertiary:       #2c3036;
  --bg-topbar-bg:      #22262b;
  --bg-inset:          #14171a;

  --border-color:      #3a3f46;
  --border-muted:      #2c3036;
  --zeleen-card-border: 1px solid #3a3f46;

  --text-primary:      #e8ecef;
  --text-secondary:    #9aa3ad;
  --text-white:        #ffffff;

  --accent-blue:       #009b4f;
  --accent-blue-hover: #2af944ad;
  --accent-green:      #009b4f;
  --accent-green-hover:#4fe0ae;
  --accent-red:        #f25c54;
  --accent-amber:      #f5b849;
  --accent-purple:     #9b7dff;

  --shadow-sm: 0 0.0625rem 0 rgba(255,255,255,0.03), 0 0.0625rem 0.125rem rgba(0,0,0,0.35);
  --shadow-md: 0 0.0625rem 0 rgba(255,255,255,0.03), 0 0.5rem 1.25rem rgba(0,0,0,0.45);
  --shadow-lg: 0 0.0625rem 0 rgba(255,255,255,0.03), 0 1.25rem 3rem rgba(0,0,0,0.55);

  color-scheme: dark;
}
:root[data-theme="zeleen"] body {
  background: linear-gradient(180deg, #1a1d21 0%, #171a1d 100%);
  background-attachment: fixed;
}
:root[data-theme="zeleen"] .zel-topbar {
  background: #22262b;
  border-bottom: 1px solid #3a3f46;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
:root[data-theme="zeleen"] .zel-sidebar {
  background: #1d2125;
  border-right: 1px solid #3a3f46;
}
:root[data-theme="zeleen"] .zel-nav-item.active {
  background: rgba(47, 210, 155, 0.12);
  color: var(--text-white);
  box-shadow: inset 0.1875rem 0 0 0 var(--accent-blue);
}
:root[data-theme="zeleen"] .zel-nav-item.active i { color: var(--accent-blue); }
:root[data-theme="zeleen"] .zel-card,
:root[data-theme="zeleen"] .zel-stat-card {
  background: var(--bg-secondary);
  border: var(--zeleen-card-border);
  box-shadow: var(--shadow-md);
}
:root[data-theme="zeleen"] .zel-btn-primary,
:root[data-theme="zeleen"] .auth-btn-primary {
  background: var(--accent-blue);
  border: 1px solid #26b586;
  color: #ffffff;
  font-weight: 600;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
:root[data-theme="zeleen"] .zel-btn-primary:hover { background: var(--accent-blue-hover); color: #ffffff; }
:root[data-theme="zeleen"] .zel-btn-success {
  color: #ffffff;
}
:root[data-theme="zeleen"] .zel-btn-success:hover {
  color: #ffffff;
}
:root[data-theme="zeleen"] .auth-input-wrap:focus-within,
:root[data-theme="zeleen"] .zel-input:focus,
:root[data-theme="zeleen"] .zel-select:focus,
:root[data-theme="zeleen"] .zel-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 0.1875rem rgba(47, 210, 155, 0.22);
}
:root[data-theme="zeleen"] .zel-tab.active { border-bottom-color: var(--accent-blue); color: var(--text-white); }
:root[data-theme="zeleen"] .zel-table thead th { color: var(--accent-blue); border-bottom-color: #3a3f46; }
:root[data-theme="zeleen"] .zel-tenant-combo:focus-within { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(47,210,155,0.18); }
.zel-theme-option[data-theme="zeleen"] .zel-theme-swatch {
  background: linear-gradient(135deg, #2fd29b 0%, #22262b 70%);
  border-color: #2fd29b;
}
.zel-badge.zeleen {
  background: rgba(47,210,155,0.18); color: #8ef0c7; border: 1px solid rgba(47,210,155,0.45);
}

/* =============================================================
   ZELNIGHT — "Midnight Graphite" (successor of the legacy Dark theme)
   Built on Zeleen's crisp, zero-blur editorial structure, but in a
   dark grey-blue palette with a marine-blue lead. This is the polished
   "big brother" of the old Dark theme (data-theme="dark" aliases here).
   ============================================================= */
:root[data-theme="zelnight"] {
  --bg-primary:        #12161d;
  --bg-secondary:      #1a1f28;
  --bg-tertiary:       #232a35;
  --bg-topbar-bg:      #1a1f28;
  --bg-inset:          #0d1015;

  --border-color:      #2e3742;
  --border-muted:      #232a35;

  --text-primary:      #e5eaf1;
  --text-secondary:    #94a1b2;
  --text-white:        #ffffff;

  --accent-blue:       #4d90e6;
  --accent-blue-hover: #6ea9f2;
  --accent-green:      #2fbf71;
  --accent-green-hover:#43d488;
  --accent-red:        #f25c54;
  --accent-amber:      #f5b849;
  --accent-purple:     #8b9dff;

  --shadow-sm: 0 0.0625rem 0 rgba(255,255,255,0.03), 0 0.0625rem 0.125rem rgba(0,0,0,0.40);
  --shadow-md: 0 0.0625rem 0 rgba(255,255,255,0.03), 0 0.5rem 1.25rem rgba(0,0,0,0.50);
  --shadow-lg: 0 0.0625rem 0 rgba(255,255,255,0.03), 0 1.25rem 3rem rgba(0,0,0,0.60);

  color-scheme: dark;
}
:root[data-theme="zelnight"] body {
  background: linear-gradient(180deg, #12161d 0%, #10141a 100%);
  background-attachment: fixed;
}
:root[data-theme="zelnight"] .zel-topbar {
  background: #1a1f28;
  border-bottom: 1px solid #2e3742;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
:root[data-theme="zelnight"] .zel-sidebar {
  background: #161b23;
  border-right: 1px solid #2e3742;
}
:root[data-theme="zelnight"] .zel-nav-item.active {
  background: rgba(77, 144, 230, 0.14);
  color: var(--text-white);
  box-shadow: inset 0.1875rem 0 0 0 var(--accent-blue);
}
:root[data-theme="zelnight"] .zel-nav-item.active i { color: var(--accent-blue); }
:root[data-theme="zelnight"] .zel-card,
:root[data-theme="zelnight"] .zel-stat-card {
  background: #1a1f28;
  border: 1px solid #2e3742;
  box-shadow: var(--shadow-md);
}
:root[data-theme="zelnight"] .zel-btn-primary,
:root[data-theme="zelnight"] .auth-btn-primary {
  background: var(--accent-blue);
  border: 1px solid #3f7fd0;
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
:root[data-theme="zelnight"] .zel-btn-primary:hover,
:root[data-theme="zelnight"] .auth-btn-primary:hover { background: var(--accent-blue-hover); color: #ffffff; }
:root[data-theme="zelnight"] .auth-input-wrap:focus-within,
:root[data-theme="zelnight"] .zel-input:focus,
:root[data-theme="zelnight"] .zel-select:focus,
:root[data-theme="zelnight"] .zel-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 0.1875rem rgba(77, 144, 230, 0.22);
}
:root[data-theme="zelnight"] .zel-tab.active { border-bottom-color: var(--accent-blue); color: var(--text-white); }
:root[data-theme="zelnight"] .zel-table thead th { color: var(--accent-blue); border-bottom-color: #2e3742; }
:root[data-theme="zelnight"] .zel-tenant-combo:focus-within { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(77,144,230,0.18); }
.zel-badge.zelnight {
  background: rgba(77,144,230,0.18); color: #b8d4f7; border: 1px solid rgba(77,144,230,0.45);
}

/* =============================================================
   15. ZELETRO — "80s Synthwave" (geeky, glow, neon purple/pink)
   ============================================================= */
:root[data-theme="zeletro"] {
  --bg-primary:        #0b0220;
  --bg-secondary:      #120433;
  --bg-tertiary:       #1a0742;
  --bg-topbar-bg:      #120433;
  --bg-inset:          #070118;

  --border-color:      rgba(255, 46, 170, 0.35);
  --border-muted:      rgba(255, 46, 170, 0.14);

  --text-primary:      #f1e6ff;
  --text-secondary:    #a690d0;
  --text-white:        #ffffff;

  --accent-blue:       #ff2eaa;
  --accent-blue-hover: #ff63be;
  --accent-green:      #00c750;
  --accent-green-hover:#2e7a4c;
  --accent-red:        #ff2e6a;
  --accent-amber:      #ffcc00;
  --accent-purple:     #9a40ff;

  --shadow-sm: 0 0 0 0.0625rem rgba(175,0,139,0.25), 0 0 0.5rem rgba(255,0,75,0.25);
  --shadow-md: 0 0 0 0.0625rem rgba(175,0,139,0.30), 0 0 1.5rem rgba(255,0,75,0.30);
  --shadow-lg: 0 0 0 0.0625rem rgba(175,0,139,0.35), 0 0 1.5rem rgba(255,0,75,0.35);

  color-scheme: dark;
}
:root[data-theme="zeletro"] body {
    background:
      radial-gradient(34.6875rem 34.6875rem at 50% 65%, #ef00ff40 0%, #ff2e2e0d 55%, transparent 90%),
      radial-gradient(87.5rem 25rem at 50% 95%, rgb(201 46 255 / 11%), transparent 60%),
      linear-gradient(180deg, #0b0220 0%, #1a0742 60%, #0b0220 100%);
  background-attachment: fixed;
}
:root[data-theme="zeletro"] .zel-topbar { background: rgba(18,4,51,0.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid #ff2eaa; box-shadow: 0 0 18px rgba(255,46,170,0.35); }
:root[data-theme="zeletro"] .zel-sidebar { background: rgba(11,2,32,0.88); border-right: 1px solid #9a40ff; box-shadow: inset -1px 0 14px rgba(154,64,255,0.25); }
:root[data-theme="zeletro"] .zel-nav-item.active { background: linear-gradient(135deg, rgba(255,46,170,0.22), rgba(0,240,255,0.18)); color: #fff; box-shadow: inset 0.1875rem 0 0 0 #ff2eaa, 0 0 1rem rgba(255,46,170,0.30); }
:root[data-theme="zeletro"] .zel-nav-item.active i { color: #ff2eaa; }
:root[data-theme="zeletro"] .zel-card,
/* :root[data-theme="zeletro"] .zel-stat-card { background: rgba(18,4,51,0.78); border: 1px solid rgba(255,46,170,0.42); box-shadow: 0 0 24px rgba(0,240,255,0.24), inset 0 0 0 1px rgba(154,64,255,0.18); } */
:root[data-theme="zeletro"] .zel-stat-card { background: rgba(18, 4, 51, 0.75); border: 1px solid rgba(255, 46, 170, 0.3); box-shadow: 0 0 20px rgb(172 0 255 / 9%), inset 0 0 8px rgb(255 0 145 / 15%); }
:root[data-theme="zeletro"] .zel-card-title { color: #ff00aa; text-shadow: 0 0 0.5rem rgb(255 0 204 / 20%); }
:root[data-theme="zeletro"] .zel-btn-primary,
:root[data-theme="zeletro"] .auth-btn-primary { background: linear-gradient(135deg, #be00f6 0%, #ff68d2 100%); color: #fff; border: 1px solid #ff66a9c2; box-shadow: 0 0 6px rgba(255,46,170,0.75), inset 0 1px 0 rgba(255,255,255,0.25); font-weight: 600; }
:root[data-theme="zeletro"] .zel-tab.active { border-bottom-color: #ff2eaa; color: #fff; text-shadow: 0 0 6px rgba(255,46,170,0.5); }
:root[data-theme="zeletro"] .zel-table thead th { color: #ff00aa; background: transparent; }
.zel-theme-option[data-theme="zeletro"] .zel-theme-swatch { background: radial-gradient(circle at 30% 30%, #ffcc00 0%, #ff2eaa 45%, #9a40ff 80%, #0b0220 100%); border-color: #ff2eaa; box-shadow: 0 0 12px rgba(255,46,170,0.6); }
.zel-badge.zeletro { background: rgba(255,46,170,0.18); color: #ffa6dc; border: 1px solid #ff2eaa; text-shadow: 0 0 6px rgba(255,46,170,0.45); }


/* ---- _utilities.css ---- */
/* ============================================
   Zelect Webkit -- Public Utility Contract
   Prefix: zel-*

   Keep this file to small, composable primitives:
   layout, type, spacing/sizing, surfaces, color helpers,
   state modifiers, and cross-component composition helpers.
   Showcase-only sample classes belong in the demo stylesheet.
   ============================================ */

/* Layout primitives */
.zel-stack       { display: flex; flex-direction: column; gap: 1rem; }
.zel-stack-sm    { display: flex; flex-direction: column; gap: 0.5rem; }
.zel-stack-xs    { display: flex; flex-direction: column; gap: 0.25rem; }
.zel-cluster     { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.zel-cluster-sm  { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.zel-split       { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.zel-grid        { display: grid; gap: 1rem; }
.zel-grid-cards  { display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: 1rem; }
.zel-grid-2      { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.zel-grid-3      { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.zel-flow > * + * { margin-top: var(--flow-space, 1rem); }
.zel-center      { display: flex; align-items: center; justify-content: center; }
.zel-media       { display: flex; align-items: flex-start; gap: 1rem; }

/* 12-column layout contract (Bootstrap-like semantics with zel-* prefix) */
.zel-row {
  --zel-gutter-x: 0.75rem;
  --zel-gutter-y: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  margin-top: calc(-1 * var(--zel-gutter-y));
  margin-right: calc(-0.5 * var(--zel-gutter-x));
  margin-left: calc(-0.5 * var(--zel-gutter-x));
}
.zel-row > * {
  box-sizing: border-box;
  padding-right: calc(var(--zel-gutter-x) * 0.5);
  padding-left: calc(var(--zel-gutter-x) * 0.5);
  margin-top: var(--zel-gutter-y);
}
.zel-col { flex: 1 0 0%; min-width: 0; }
.zel-col-auto { flex: 0 0 auto; width: auto; }
.zel-col-1 { flex: 0 0 auto; width: 8.333333%; }
.zel-col-2 { flex: 0 0 auto; width: 16.666667%; }
.zel-col-3 { flex: 0 0 auto; width: 25%; }
.zel-col-4 { flex: 0 0 auto; width: 33.333333%; }
.zel-col-5 { flex: 0 0 auto; width: 41.666667%; }
.zel-col-6 { flex: 0 0 auto; width: 50%; }
.zel-col-7 { flex: 0 0 auto; width: 58.333333%; }
.zel-col-8 { flex: 0 0 auto; width: 66.666667%; }
.zel-col-9 { flex: 0 0 auto; width: 75%; }
.zel-col-10 { flex: 0 0 auto; width: 83.333333%; }
.zel-col-11 { flex: 0 0 auto; width: 91.666667%; }
.zel-col-12 { flex: 0 0 auto; width: 100%; }

@media (min-width: 576px) {
  .zel-col-sm-1 { flex: 0 0 auto; width: 8.333333%; }
  .zel-col-sm-2 { flex: 0 0 auto; width: 16.666667%; }
  .zel-col-sm-3 { flex: 0 0 auto; width: 25%; }
  .zel-col-sm-4 { flex: 0 0 auto; width: 33.333333%; }
  .zel-col-sm-5 { flex: 0 0 auto; width: 41.666667%; }
  .zel-col-sm-6 { flex: 0 0 auto; width: 50%; }
  .zel-col-sm-7 { flex: 0 0 auto; width: 58.333333%; }
  .zel-col-sm-8 { flex: 0 0 auto; width: 66.666667%; }
  .zel-col-sm-9 { flex: 0 0 auto; width: 75%; }
  .zel-col-sm-10 { flex: 0 0 auto; width: 83.333333%; }
  .zel-col-sm-11 { flex: 0 0 auto; width: 91.666667%; }
  .zel-col-sm-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 768px) {
  .zel-col-md-1 { flex: 0 0 auto; width: 8.333333%; }
  .zel-col-md-2 { flex: 0 0 auto; width: 16.666667%; }
  .zel-col-md-3 { flex: 0 0 auto; width: 25%; }
  .zel-col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .zel-col-md-5 { flex: 0 0 auto; width: 41.666667%; }
  .zel-col-md-6 { flex: 0 0 auto; width: 50%; }
  .zel-col-md-7 { flex: 0 0 auto; width: 58.333333%; }
  .zel-col-md-8 { flex: 0 0 auto; width: 66.666667%; }
  .zel-col-md-9 { flex: 0 0 auto; width: 75%; }
  .zel-col-md-10 { flex: 0 0 auto; width: 83.333333%; }
  .zel-col-md-11 { flex: 0 0 auto; width: 91.666667%; }
  .zel-col-md-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 992px) {
  .zel-col-lg-1 { flex: 0 0 auto; width: 8.333333%; }
  .zel-col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
  .zel-col-lg-3 { flex: 0 0 auto; width: 25%; }
  .zel-col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
  .zel-col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
  .zel-col-lg-6 { flex: 0 0 auto; width: 50%; }
  .zel-col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
  .zel-col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
  .zel-col-lg-9 { flex: 0 0 auto; width: 75%; }
  .zel-col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
  .zel-col-lg-11 { flex: 0 0 auto; width: 91.666667%; }
  .zel-col-lg-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 1200px) {
  .zel-col-xl-1 { flex: 0 0 auto; width: 8.333333%; }
  .zel-col-xl-2 { flex: 0 0 auto; width: 16.666667%; }
  .zel-col-xl-3 { flex: 0 0 auto; width: 25%; }
  .zel-col-xl-4 { flex: 0 0 auto; width: 33.333333%; }
  .zel-col-xl-5 { flex: 0 0 auto; width: 41.666667%; }
  .zel-col-xl-6 { flex: 0 0 auto; width: 50%; }
  .zel-col-xl-7 { flex: 0 0 auto; width: 58.333333%; }
  .zel-col-xl-8 { flex: 0 0 auto; width: 66.666667%; }
  .zel-col-xl-9 { flex: 0 0 auto; width: 75%; }
  .zel-col-xl-10 { flex: 0 0 auto; width: 83.333333%; }
  .zel-col-xl-11 { flex: 0 0 auto; width: 91.666667%; }
  .zel-col-xl-12 { flex: 0 0 auto; width: 100%; }
}

/* Text utilities */
.zel-text-muted  { color: var(--text-secondary) !important; }
.zel-text-sm     { font-size: 0.85rem !important; }
.zel-text-xs     { font-size: 0.72rem !important; }
.zel-text-2xs    { font-size: 0.6rem !important; }
.zel-text-xl     { font-size: 1.5rem !important; }
.zel-text-mono   { font-family: monospace !important; }
.zel-text-bold   { font-weight: 600 !important; }
.zel-leading-tight { line-height: 1 !important; }
.zel-text-upper  { text-transform: uppercase !important; letter-spacing: 0.08em !important; }
.zel-text-center { text-align: center !important; }
.zel-text-white  { color: var(--text-white) !important; }
.zel-text-red    { color: var(--accent-red) !important; }
.zel-text-blue   { color: var(--accent-blue) !important; }
.zel-text-green  { color: var(--accent-green) !important; }
.zel-text-purple { color: var(--accent-purple) !important; }
.zel-text-amber  { color: var(--accent-amber) !important; }

/* Spacing/flex helpers */
.zel-flex-1      { flex: 1 !important; }
.zel-w-full      { width: 100% !important; }

/* Max-width scale (rem) */
.max-5rem  { max-width: 5rem; }
.max-10rem { max-width: 10rem; }
.max-15rem { max-width: 15rem; }
.max-20rem { max-width: 20rem; }
.max-25rem { max-width: 25rem; }
.max-30rem { max-width: 30rem; }
.max-35rem { max-width: 35rem; }
.max-40rem { max-width: 40rem; }
.max-45rem { max-width: 45rem; }
.max-50rem { max-width: 50rem; }
.zel-col-80      { width: 5rem !important; }
.zel-shrink-0    { flex-shrink: 0 !important; }
.zel-mb-0        { margin-bottom: 0 !important; }
.zel-nowrap      { white-space: nowrap !important; }
.zel-mt-sm       { margin-top: 0.5rem !important; }
.zel-mt-md       { margin-top: 0.75rem !important; }
.zel-mb-sm       { margin-bottom: 0.3rem !important; }
.zel-mb-md       { margin-bottom: 0.75rem !important; }
.zel-ml-xs       { margin-left: 0.25rem !important; }
.zel-ml-sm       { margin-left: 0.5rem !important; }
.zel-mr-sm       { margin-right: 0.4rem !important; }
.zel-mr-xs       { margin-right: 0.25rem !important; }
.zel-mx-auto     { margin-left: auto !important; margin-right: auto !important; }
.zel-m-0         { margin: 0 !important; }
.zel-mb-05       { margin-bottom: 0.5rem !important; }
.zel-ml-md       { margin-left: 1rem !important; }
.zel-pb-18       { padding-bottom: 1.125rem !important; }
.zel-pb-20       { padding-bottom: 1.25rem !important; }
.zel-min-h-110   { min-height: 6.875rem !important; }
.zel-min-h-120   { min-height: 7.5rem !important; }
.zel-w-18p       { width: 18% !important; }
.zel-w-24p       { width: 24% !important; }
.zel-w-31p       { width: 31% !important; }
.zel-w-37p       { width: 37% !important; }
.zel-w-38p       { width: 38% !important; }
.zel-w-61p       { width: 61% !important; }
.zel-w-64p       { width: 64% !important; }
.zel-w-84p       { width: 84% !important; }
.zel-w-88p       { width: 88% !important; }
.zel-w-90p       { width: 90% !important; }
.zel-w-98p       { width: 98% !important; }
.zel-h-10p       { height: 10% !important; }
.zel-h-12p       { height: 12% !important; }
.zel-h-20p       { height: 20% !important; }
.zel-h-22p       { height: 22% !important; }
.zel-h-40p       { height: 40% !important; }
.zel-h-45p       { height: 45% !important; }
.zel-h-55p       { height: 55% !important; }
.zel-h-60p       { height: 60% !important; }
.zel-h-62p       { height: 62% !important; }
.zel-h-72p       { height: 72% !important; }
.zel-h-74p       { height: 74% !important; }
.zel-h-88p       { height: 88% !important; }
.zel-col-32      { width: 2rem !important; }
.zel-col-160     { width: 10rem !important; }

/* Background helpers */
.zel-bg-primary { background: var(--bg-primary) !important; }
.zel-bg-secondary { background: var(--bg-secondary) !important; }
.zel-bg-tertiary { background: var(--bg-tertiary) !important; }
.zel-bg-elevated { background: var(--bg-elevated) !important; }
.zel-bg-inset    { background: var(--bg-inset) !important; }
.zel-bg-card     { background: var(--bg-card, var(--bg-secondary)) !important; }
.zel-bg-input    { background: var(--bg-input, var(--bg-tertiary)) !important; }
.zel-bg-accent-blue { background: var(--accent-blue) !important; }
.zel-bg-accent-blue-hover { background: var(--accent-blue-hover) !important; }
.zel-bg-accent-cyan { background: var(--accent-cyan) !important; }
.zel-bg-accent-green { background: var(--accent-green) !important; }
.zel-bg-accent-green-hover { background: var(--accent-green-hover) !important; }
.zel-bg-accent-red { background: var(--accent-red) !important; }
.zel-bg-accent-amber { background: var(--accent-amber) !important; }
.zel-bg-accent-purple { background: var(--accent-purple) !important; }
.zel-border-default { border: 1px solid var(--border-color) !important; }
.zel-border-strong { border: 1px solid var(--border-strong) !important; }
.zel-radius-xxs  { border-radius: var(--radius-xxs) !important; }
.zel-radius-xs   { border-radius: var(--radius-xs) !important; }
.zel-radius-sm   { border-radius: var(--radius-sm) !important; }
.zel-radius-md   { border-radius: var(--radius-md) !important; }
.zel-radius-lg   { border-radius: var(--radius-lg) !important; }
.zel-radius-xl   { border-radius: var(--radius-xl) !important; }
.zel-radius-xxl  { border-radius: var(--radius-xxl) !important; }
.zel-shadow-xxs  { box-shadow: var(--shadow-xxs) !important; }
.zel-shadow-xs   { box-shadow: var(--shadow-xs) !important; }
.zel-shadow-sm   { box-shadow: var(--shadow-sm) !important; }
.zel-shadow-md   { box-shadow: var(--shadow-md) !important; }
.zel-shadow-lg   { box-shadow: var(--shadow-lg) !important; }
.zel-shadow-xl   { box-shadow: var(--shadow-xl) !important; }
.zel-shadow-xxl  { box-shadow: var(--shadow-xxl) !important; }

/* Avatar size modifiers (combine with .zel-avatar) */
.zel-avatar-sm   { width: 1.5rem !important; height: 1.5rem !important; font-size: 0.6rem !important; }
.zel-avatar-md   { width: 2rem !important; height: 2rem !important; font-size: 0.75rem !important; }
.zel-avatar-xs   { width: 1.375rem !important; height: 1.375rem !important; font-size: 0.55rem !important; }
.zel-avatar-sq   { border-radius: 0.5rem !important; }
.zel-avatar-gradient-green-blue { background: linear-gradient(135deg, var(--accent-green), var(--accent-blue)) !important; }
.zel-avatar-gradient-amber-red { background: linear-gradient(135deg, var(--accent-amber), var(--accent-red)) !important; }
.zel-avatar-gradient-blue-purple { background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple)) !important; }
.zel-avatar-gradient-purple-blue { background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue)) !important; }

/* Icon helpers */
.zel-icon-lg { font-size: 1.25rem !important; }

/* Badge size modifier (combine with .zel-badge) */
.zel-badge-sm    { padding: 0.05rem 0.35rem !important; font-size: 0.6rem !important; }
.zel-badge-xs    { font-size: 0.55rem !important; padding: 0.1rem 0.35rem !important; }

/* Donut and chart value helpers */
.zel-donut-72p { --pct: 72; }
.zel-donut-87p { --pct: 87; }
.zel-donut-94p { --pct: 94; }
.zel-accent-blue { --c: var(--accent-blue); }
.zel-accent-green { --c: var(--accent-green); }
.zel-accent-purple { --c: var(--accent-purple); }
.zel-accent-amber { --c: var(--accent-amber); }
.zel-accent-red { --c: var(--accent-red); }
.zel-sparkline-dicom { --a: 20; --b: 35; --c: 28; --d: 48; --e: 42; --f: 62; --g: 74; --col: var(--accent-blue); }
.zel-sparkline-ai { --a: 48; --b: 52; --c: 30; --d: 66; --e: 54; --f: 70; --g: 60; --col: var(--accent-purple); }
.zel-sparkline-billing { --a: 12; --b: 18; --c: 14; --d: 22; --e: 20; --f: 28; --g: 32; --col: var(--accent-green); }
.zel-sparkline-email { --a: 30; --b: 26; --c: 18; --d: 22; --e: 12; --f: 14; --g: 8; --col: var(--accent-amber); }

/* Standalone coloured icon container */
.zel-icon-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: var(--radius-sm); flex-shrink: 0;
}
.zel-icon-box.purple { color: var(--accent-purple); background: rgba(139,92,246,0.15); }
.zel-icon-box.blue   { color: var(--accent-blue);   background: rgba(31,111,235,0.15); }
.zel-icon-box.green  { color: var(--accent-green);  background: rgba(35,134,54,0.15);  }
.zel-icon-box.amber  { color: var(--accent-amber);  background: rgba(210,153,34,0.15); }
.zel-icon-box.red    { color: var(--accent-red);    background: rgba(218,54,51,0.15);  }

/* Reusable component helpers */
.zel-icon-leading  { margin-right: 0.4rem !important; }
.zel-icon-docker   { color: #2496ed !important; margin-right: 0.4rem !important; }
.zel-note          { font-size: 0.78rem !important; color: var(--text-secondary) !important; }
.zel-note-meta     { font-size: 0.75rem !important; color: var(--text-secondary) !important; }
.zel-numeric-strong { font-variant-numeric: tabular-nums; color: var(--text-white) !important; font-weight: 600 !important; }

.zel-kpi-row       { display: flex; align-items: baseline; gap: 0.5rem; }
.zel-kpi-value     { font-size: 2rem; font-weight: 700; color: var(--text-white); }
.zel-kpi-caption   { font-size: 0.75rem; color: var(--text-secondary); margin: 0.35rem 0 0.75rem; }

.zel-card-footer-row { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 0.75rem; }
.zel-card-footer-end { display: flex; justify-content: flex-end; margin-top: 0.75rem; }

.zel-list-row      { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; }
.zel-list-row-label { flex: 1; color: var(--text-primary); }
.zel-list-row-meta { font-size: 0.68rem; color: var(--text-secondary); }

.zel-stat-card-stack { flex-direction: column !important; align-items: flex-start !important; gap: 0.4rem !important; }
.zel-stat-value-lg { font-size: 1.5rem !important; }

.zel-action-cell { white-space: nowrap; }
.zel-action-cell .zel-btn-icon + .zel-btn-icon { margin-left: 0.25rem; }

.zel-cluster-md   { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.zel-cluster-rg   { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.zel-cluster-lg   { gap: 1.5rem !important; }
.zel-items-end    { align-items: flex-end !important; }
.zel-justify-end  { justify-content: flex-end !important; }
.zel-flex-center  { display: flex; align-items: center; }
.zel-text-end     { text-align: right !important; }
.zel-eyebrow      { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.zel-inset-panel  { border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; }
.zel-inset-panel--secondary { background: var(--bg-secondary); }
.zel-list-reset   { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.zel-mt-xs        { margin-top: 0.2rem !important; }
.zel-mt-rg        { margin-top: 0.9rem !important; }
.zel-mt-lg        { margin-top: 1rem !important; }
.zel-mb-lg        { margin-bottom: 1rem !important; }
.zel-py-sm        { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.zel-pos-static   { position: static !important; }
.zel-no-animation { animation: none !important; }
.zel-overflow-hidden { overflow: hidden !important; }

/* Mobile helpers */
.zel-touch-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 768px) {
  .zel-mobile-stack  { flex-direction: column !important; align-items: stretch !important; }
  .zel-mobile-full   { width: 100% !important; }
  .zel-mobile-grid-1 { grid-template-columns: 1fr !important; }
}


