/* ==========================================================================
   HAMIDUN CRM — KOSTYA v4.9 (RITUALS + PRACTICUM) DESIGN SYSTEM
   Ported 1:1 from https://github.com/adhappyday2017-cell/hamidun-academy-src
   (src/head.html, club_shell.css, club_admin.css, club.css, club_cal.css,
    club_chat.css, club_courses.css, club_select.css)
   ========================================================================== */

:root,
:root[data-theme="light"] {
  /* Core Kostya v4.9 Tokens (Light Default — Rituals #FAFAFA paper + #FFFFFF cards) */
  --paper: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F5F5F6;
  --sunken: #EFEFF1;

  --ink: #14151C;
  --ink-2: #434859;
  --ink-3: #5B6073;
  --line: #E2E5EC;
  --line-2: #CFD3DD;

  --navy: #0A0E2C;
  --navy-2: #141A4E;
  --on-navy: #EEF1FB;
  --on-navy-2: #B9BEDC;
  --navy-line: rgba(238, 241, 251, 0.16);

  /* Electric Blue Brand Accent (no terracotta, no burgundy, no purple) */
  --blue: #2D2FE8;
  --blue-ink: #2426C9;
  --blue-soft: #ECEDFE;
  --blue-line: rgba(45, 47, 232, 0.22);
  --on-blue: #FFFFFF;
  --cyan: #29A9FF;

  --accent: #2D2FE8;
  --accent-hover: #2426C9;
  --on-accent: #FFFFFF;

  --terra: #2D2FE8;
  --terra-hover: #2426C9;
  --terra-ink: #2426C9;
  --terra-soft: #ECEDFE;

  --alert: #D92D20;
  --green: #1D7A3D;
  --green-soft: #E5F3EA;
  --amber: #7A4F00;
  --amber-soft: #FBF0D9;
  --red: #B3261E;

  --hl: #FFE27A;
  --sel: #D5D9FF;
  --focus: #2D2FE8;
  --scrim: rgba(10, 14, 44, 0.42);
  --ctl-line: #868C9E;

  --gold: #2D2FE8;
  --gold-2: #2426C9;
  --gold-soft: #ECEDFE;
  --gold-line: rgba(45, 47, 232, 0.22);
  --gold-line-2: rgba(45, 47, 232, 0.12);
  --gold-ink: #2426C9;
  --gold-bar: #2D2FE8;

  --shadow: 0 18px 50px rgba(10, 14, 44, 0.16);
  --shadow-sm: 0 4px 16px rgba(10, 14, 44, 0.08);

  --r-xl: 20px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;

  --f-display: var(--font-oswald), "Oswald", var(--font-inter-tight), "Inter Tight", "Arial Narrow", sans-serif;
  --f-text: var(--font-manrope), "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Rituals Left Navigation Tokens */
  --nav-w: 296px;
  --nav-min: 64px;
  --nav-bg: #FAFAFA;
  --nav-line: #ECECEE;
  --nav-ink: #434859;
  --nav-active: #EFEFF1;

  /* Black Filter Pill Tokens (.cal4-dd) */
  --cal-c: #14151C;
  --cal-cs: #EFEFF1;
  --cal-on: #FFFFFF;

  /* Rituals Chat Tokens */
  --ch-me-line: #D9DBFB;
  --ch-send-off: #DCDEF7;
  --ch-glass: rgba(250, 250, 250, 0.85);

  /* Bridge legacy CRM variables to Kostya v4.9 tokens so all inner screens inherit the clean look */
  --bg: #FAFAFA;
  --bg-2: #F5F5F6;
  --panel: #FFFFFF;
  --elevated: #F5F5F6;
  --elevated-2: #EFEFF1;
  --ink-dim: #434859;
  --ink-faint: #5B6073;
  --hair-gold: rgba(45, 47, 232, 0.22);
  --gold-deep: #2426C9;
  --gold-glow: rgba(45, 47, 232, 0.14);
  --h-primary: #2D2FE8;
  --h-primary-hover: #2426C9;
  --h-deep: #0A0E2C;
  --h-cyan: #29A9FF;
  --h-green: #1D7A3D;
  --h-red: #D92D20;
  --h-yellow: #7A4F00;
  --h-cream: #FAFAFA;
  --h-cream-warm: #F5F5F6;
  --h-terra: #2D2FE8;
  --h-ink: #14151C;
  --hover-tint: #F5F5F6;
  --hover-tint-2: #EFEFF1;
  --pill-low-bg: #EFEFF1;
  --green-bg: #E5F3EA;
  --red-bg: #FCE8E6;
  --amber-bg: #FBF0D9;
  --terra-bg: #ECEDFE;
  --gold-bg: #ECEDFE;
  --blue-bg: #ECEDFE;
  --shadow-1: 0 4px 16px rgba(10, 14, 44, 0.06);
  --shadow-glow: 0 18px 50px rgba(10, 14, 44, 0.12);
  --sb-w: 296px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #080A18;
  --surface: #10132A;
  --surface-2: #151937;
  --sunken: #0C0E21;

  --ink: #EEF1FB;
  --ink-2: #BCC1DC;
  --ink-3: #9CA1C2;
  --line: #232848;
  --line-2: #323860;

  --navy: #141A4D;
  --navy-2: #1E2568;
  --on-navy: #EEF1FB;
  --on-navy-2: #BCC1DC;
  --navy-line: rgba(238, 241, 251, 0.18);

  --blue: #4B5BFF;
  --blue-ink: #C5CAFF;
  --blue-soft: #1B2050;
  --blue-line: rgba(144, 150, 255, 0.4);
  --on-blue: #FFFFFF;
  --cyan: #29A9FF;

  --accent: #4B5BFF;
  --accent-hover: #3D4BEB;
  --on-accent: #FFFFFF;

  --terra: #4B5BFF;
  --terra-hover: #3D4BEB;
  --terra-ink: #AEB3FF;
  --terra-soft: #1B2050;

  --alert: #D92D20;
  --green: #63CD8A;
  --green-soft: #11301F;
  --amber: #F2C265;
  --amber-soft: #2E2511;
  --red: #FF8A80;

  --hl: #6E5B10;
  --sel: #2E3580;
  --focus: #9096FF;
  --scrim: rgba(0, 0, 0, 0.6);
  --ctl-line: #646BA0;

  --gold: #9096FF;
  --gold-2: #AEB3FF;
  --gold-soft: #1B2050;
  --gold-line: rgba(144, 150, 255, 0.4);
  --gold-line-2: rgba(144, 150, 255, 0.2);
  --gold-ink: #AEB3FF;
  --gold-bar: #4B5BFF;

  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);

  --nav-bg: #0B0E22;
  --nav-line: #1F2446;
  --nav-ink: #BCC1DC;
  --nav-active: #1A1F42;

  --cal-c: #EEF1FB;
  --cal-cs: #1C1F36;
  --cal-on: #0A0E2C;

  --ch-me-line: #2A3070;
  --ch-send-off: #2C336A;
  --ch-glass: rgba(8, 10, 24, 0.82);

  /* Legacy bridges for dark mode */
  --bg: #080A18;
  --bg-2: #0C0E21;
  --panel: #10132A;
  --elevated: #151937;
  --elevated-2: #1A1F42;
  --ink-dim: #BCC1DC;
  --ink-faint: #9CA1C2;
  --hair-gold: rgba(144, 150, 255, 0.35);
  --gold-deep: #4B5BFF;
  --gold-glow: rgba(75, 91, 255, 0.25);
  --h-primary: #4B5BFF;
  --h-primary-hover: #3D4BEB;
  --h-deep: #080A18;
  --h-cyan: #29A9FF;
  --h-green: #63CD8A;
  --h-red: #FF8A80;
  --h-yellow: #F2C265;
  --h-cream: #EEF1FB;
  --h-cream-warm: #BCC1DC;
  --h-terra: #4B5BFF;
  --h-ink: #EEF1FB;
  --hover-tint: #151937;
  --hover-tint-2: #1A1F42;
  --pill-low-bg: #151937;
  --green-bg: #11301F;
  --red-bg: rgba(255, 138, 128, 0.15);
  --amber-bg: #2E2511;
  --terra-bg: #1B2050;
  --gold-bg: #1B2050;
  --blue-bg: #1B2050;
  --shadow-1: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 18px 50px rgba(0, 0, 0, 0.5);

  color-scheme: dark;
}

/* ==========================================================================
   BASE & TYPOGRAPHY (Kostya v4.9)
   ========================================================================== */
body {
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-family: var(--f-text) !important;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hide legacy ambient glass orbs so the page has Kostya's pure #FAFAFA surface */
.lg-ambient-canvas {
  display: none !important;
}

.sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.d1 {
  font: 600 40px/1.16 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.004em;
  color: var(--ink);
}
.d2 {
  font: 600 28px/1.14 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.006em;
}
.num {
  font-family: var(--f-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.h2 {
  font: 600 22px/28px var(--f-text);
  letter-spacing: -0.012em;
  color: var(--ink);
}
.h3 {
  font: 600 17px/24px var(--f-text);
  letter-spacing: -0.006em;
  color: var(--ink);
}
.lead {
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-2);
}
.t2 {
  color: var(--ink-2);
}
.t3 {
  color: var(--ink-3);
}
.sm {
  font-size: 14px;
  line-height: 20px;
}
.xs {
  font-size: 13px;
  line-height: 18px;
}
.b {
  font-weight: 600;
}
.nb {
  white-space: nowrap;
}

/* ==========================================================================
   RITUALS SHELL & LEFT SIDEBAR (.shell, .snav, .smain, .mtop)
   ========================================================================== */
.shell,
.shell.app {
  display: flex !important;
  align-items: stretch;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
}
.smain,
.smain.main {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  overflow-x: hidden;
}
.smain > main {
  flex: 1 1 auto;
  width: 100%;
  padding-top: 36px;
}
.snav,
.snav.sidebar {
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  width: var(--nav-w) !important;
  padding: 0 !important;
  flex: none !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--nav-bg) !important;
  border-right: 1px solid var(--nav-line) !important;
  overflow: hidden !important;
  z-index: 41 !important;
  transition: width 0.18s ease-out;
}
.sn-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 64px;
  padding: 0 10px 0 14px;
  flex: none;
}
.sn-top .logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 40px;
  color: var(--ink) !important;
  text-decoration: none !important;
  border-radius: 10px;
  padding: 4px 6px 4px 2px;
  min-width: 0;
}
.sn-top .logo svg {
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 30px !important;
  display: block !important;
}
.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font: 800 16px/1 var(--f-text);
  flex: none;
}
.logo-word {
  font: 800 19px/1 var(--f-text);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo-tag {
  font: 600 12px/1 var(--f-text);
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin-top: 3px;
}
.sn-x {
  display: none;
}
.sn-fold {
  color: var(--ink-3);
}
.sn-fold svg {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px !important;
}
.sn-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 12px 12px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.sn-grp + .sn-grp {
  margin-top: 12px;
}
.sn-adm .sn-grp + .sn-grp {
  margin-top: 10px;
}
.sn-gl,
.sn-sec {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-size: 11px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 4px 10px;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  border-radius: 6px;
}
.sn-gl:hover,
.sn-sec:hover {
  color: var(--ink-2);
}
.sn-gl-caret {
  font-size: 10px;
  opacity: 0.6;
  transition: transform 0.15s;
  flex: none;
}
.sn-sep {
  height: 1px;
  background: var(--nav-line);
  margin: 10px 10px 8px;
}
.sn-i,
.sn-i.nav-item {
  position: relative;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 38px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: 20px !important;
  font-weight: 600 !important;
  color: var(--nav-ink) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  text-align: left !important;
  transition: background-color 0.12s;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.sn-i.nav-item--active::before {
  display: none !important;
  content: none !important;
}
.sn-ic {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px !important;
  display: inline-grid !important;
  place-items: center !important;
  color: var(--ink-3);
}
.sn-ic .ico {
  display: inline-grid !important;
  place-items: center !important;
  width: 20px !important;
  height: 20px !important;
}
.sn-i .ic,
.sn-i svg,
.sn-ic svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--ink-3);
  flex: 0 0 18px !important;
  display: block !important;
  opacity: 1 !important;
}
.sn-i > .sn-t {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: left !important;
}
.sn-i[aria-current="page"],
.sn-i.on,
.sn-i.nav-item--active {
  background: var(--nav-active) !important;
  color: var(--ink) !important;
  font-weight: 700 !important;
}
.sn-i[aria-current="page"] .ic,
.sn-i[aria-current="page"] svg,
.sn-i[aria-current="page"] .sn-ic,
.sn-i.on svg,
.sn-i.on .sn-ic {
  color: var(--blue) !important;
}
.sn-badge,
.sn-i .nav-item__badge {
  flex: 0 0 auto !important;
  margin-left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  height: 20px !important;
  padding: 0 7px !important;
  border-radius: 999px !important;
  background: var(--blue-soft) !important;
  color: var(--blue-ink) !important;
  font-family: var(--f-text) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}
.sn-badge .nav-item__badge-danger {
  color: var(--alert) !important;
  font-weight: 700 !important;
}
.sn-badge .nav-item__badge-sep {
  opacity: 0.45 !important;
  margin: 0 1px !important;
}
.sn-n {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--alert);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sn-n.blue {
  background: var(--blue);
  color: var(--on-blue);
}
.sn-user {
  flex: none;
  padding: 8px 10px;
  border-top: 1px solid var(--nav-line);
}
.sn-me {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 6px 8px;
  border-radius: 12px;
  text-align: left;
  text-decoration: none !important;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color 0.12s;
}
.sn-me > span:not(.av),
.sn-me > .sn-me-t {
  flex: 1 1 auto;
  min-width: 0;
}
.sn-me > .av {
  flex: none;
}
.sn-me b {
  display: block;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sn-me small {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.sn-me > .ic,
.sn-me > svg {
  color: var(--ink-3);
  flex: none;
}
.sn-foot {
  flex: none;
  padding: 6px 12px 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--nav-line);
}
.sn-foot .sn-i {
  min-height: 34px !important;
  padding: 5px 10px !important;
  font-size: 13px !important;
}
.sn-scrim {
  display: none;
}
.mtop {
  display: none;
}

@media (hover: hover) {
  .sn-i:hover {
    background: var(--nav-active) !important;
    color: var(--ink) !important;
  }
  .sn-me:hover {
    background: var(--nav-active);
  }
}

/* Collapsed 64px Icon Rail on Desktop */
@media (min-width: 961px) {
  .shell.nav-min .snav,
  .shell.nav-min .snav.sidebar {
    width: var(--nav-min) !important;
  }
  .shell.nav-min .sn-top {
    padding: 0;
    justify-content: center;
  }
  .shell.nav-min .sn-top .logo {
    display: none !important;
  }
  .shell.nav-min .sn-body {
    padding: 2px 10px 10px;
  }
  .shell.nav-min .sn-gl,
  .shell.nav-min .sn-sec {
    height: 1px !important;
    margin: 10px 6px !important;
    padding: 0 !important;
    background: var(--nav-line) !important;
    font-size: 0 !important;
    line-height: 0 !important;
  }
  .shell.nav-min .sn-gl > *,
  .shell.nav-min .sn-sec > * {
    display: none !important;
  }
  .shell.nav-min .sn-grp + .sn-grp {
    margin-top: 0;
  }
  .shell.nav-min .sn-i,
  .shell.nav-min .sn-i.nav-item {
    justify-content: center !important;
    padding: 8px 0 !important;
    gap: 0 !important;
  }
  .shell.nav-min .sn-i > .sn-t,
  .shell.nav-min .sn-badge,
  .shell.nav-min .sn-me > span:not(.av),
  .shell.nav-min .sn-me > .sn-me-t,
  .shell.nav-min .sn-me > .ic,
  .shell.nav-min .sn-me > svg {
    display: none !important;
  }
  .shell.nav-min .sn-n {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 10px;
  }
  .shell.nav-min .sn-user {
    padding: 8px 10px;
  }
  .shell.nav-min .sn-me {
    justify-content: center;
    padding: 6px 0;
  }
  .shell.nav-min .sn-foot {
    padding: 6px 10px 10px;
  }
  .shell.nav-min .sn-foot .sn-i {
    min-height: 38px !important;
  }
}

/* Mobile & Tablet (<= 960px): Slide-Over Drawer + Sticky .mtop */
@media (max-width: 960px) {
  .snav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: auto;
    width: min(300px, 86vw);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s ease-out, visibility 0s linear 0.2s;
    z-index: 72;
    border-right: 0;
    overflow-y: auto;
  }
  .shell.nav-open .snav {
    transform: none;
    visibility: visible;
    transition: transform 0.2s ease-out;
    box-shadow: var(--shadow);
  }
  .sn-fold {
    display: none !important;
  }
  .sn-x {
    display: inline-grid !important;
  }
  .sn-body {
    flex: none;
    overflow: visible;
    min-height: auto;
  }
  .sn-top {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--nav-bg);
    height: 56px;
    padding: 0 8px 0 14px;
  }
  .sn-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 71;
    background: var(--scrim);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 0;
  }
  .shell.nav-open .sn-scrim {
    opacity: 1;
    pointer-events: auto;
  }
  .mtop {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 56px;
    padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .mtop-t {
    font: 700 17px/1.2 var(--f-text);
    margin-left: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    color: var(--ink);
  }
  .smain > main {
    padding-top: 20px !important;
  }
}

/* ==========================================================================
   CONTAINERS, CARDS, BUTTONS, CHIPS, STATUS DOTS (Kostya v4.9)
   ========================================================================== */
.wrap,
.wrap-wide,
.canvas,
.canvas--wide,
.canvas--board,
.canvas--tabs {
  width: 100% !important;
  box-sizing: border-box !important;
}
.wrap {
  max-width: min(1080px, 100%);
  margin: 0 auto;
  padding: 24px max(24px, env(safe-area-inset-right)) 96px max(24px, env(safe-area-inset-left));
}
.wrap-wide {
  max-width: min(1380px, 100%);
  margin: 0 auto;
  padding: 24px max(24px, env(safe-area-inset-right)) 96px max(24px, env(safe-area-inset-left));
}
.canvas {
  max-width: min(1160px, 100%) !important;
  margin: 0 auto;
  padding: 28px 24px 96px;
}
.canvas--wide {
  max-width: min(1400px, 100%) !important;
}
.canvas--board {
  max-width: 100% !important;
}
.canvas--board > *:not(.kanban):not([data-board-track]):not(.phx-drawer-layer) {
  max-width: 100% !important;
  box-sizing: border-box;
}
.canvas--tabs {
  padding: 24px 24px 0 !important;
}
.canvas--tabs + .canvas {
  padding-top: 8px !important;
}

.card,
.k-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 24px;
}
.card.tight {
  padding: 16px 20px;
}
.card.flush {
  padding: 0;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px !important;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none !important;
  cursor: pointer;
}
.btn-lg {
  height: 52px;
  padding: 0 28px;
  font-size: 16px;
}
.btn-sm,
.btn--sm {
  height: 36px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  border-radius: 999px !important;
}
.btn-primary,
.btn--gold {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.btn-primary:hover,
.btn--gold:hover {
  background: var(--accent-hover) !important;
}
.btn-primary[disabled],
.btn--gold[disabled] {
  background: var(--sunken) !important;
  color: var(--ink-3) !important;
  cursor: not-allowed;
  border-color: var(--line) !important;
}
.btn-secondary,
.btn--ghost {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-2) !important;
}
.btn-secondary:hover,
.btn--ghost:hover {
  border-color: var(--ink-3) !important;
  background: var(--surface-2) !important;
}
.btn-quiet {
  background: var(--sunken) !important;
  color: var(--ink) !important;
}
.btn-dark {
  background: var(--ink) !important;
  color: var(--paper) !important;
}
.btn-ghost {
  background: transparent !important;
  color: var(--ink-2) !important;
  padding: 0 10px;
}
.btn-ghost:hover {
  background: var(--sunken) !important;
  color: var(--ink) !important;
}

.iconbtn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: var(--ink-2);
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.iconbtn:hover {
  background: var(--sunken);
  color: var(--ink);
}

.link {
  color: var(--blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-l {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  color: var(--blue);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* Avatars (.av) */
.av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  flex: none;
  background: var(--blue-soft);
  color: var(--blue-ink);
  overflow: hidden;
}
.av.me {
  background: var(--ink);
  color: var(--paper);
}
.av.sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.av.lg {
  width: 44px;
  height: 44px;
  font-size: 15px;
}
.av.xl {
  width: 64px;
  height: 64px;
  font-size: 20px;
}
.av.h1 { background: #E4E7FF; color: #2426C9; }
.av.h2 { background: #F8E6DD; color: #8C4226; }
.av.h3 { background: #DDF1E4; color: #1D6A37; }
.av.h4 { background: #FBEFD2; color: #6F4A00; }
.av.h5 { background: #E6ECF3; color: #304560; }
.av.h6 { background: #F1E3F3; color: #6B2E78; }
:root[data-theme="dark"] .av.h1 { background: #232A6B; color: #C7CBFF; }
:root[data-theme="dark"] .av.h2 { background: #3A2219; color: #F2B9A1; }
:root[data-theme="dark"] .av.h3 { background: #143522; color: #9EE0B5; }
:root[data-theme="dark"] .av.h4 { background: #3A2E10; color: #F4D37E; }
:root[data-theme="dark"] .av.h5 { background: #1E2A3C; color: #B8CBE6; }
:root[data-theme="dark"] .av.h6 { background: #33203A; color: #E1B8EA; }

/* Status Dots (.st) */
.st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 18px;
}
.st::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.st.soon {
  color: var(--ink-3);
}
.st.soon::before {
  background: none;
  border: 1.5px solid currentColor;
  width: 7px;
  height: 7px;
}
.st.live {
  color: var(--terra-ink);
}
.st.rec {
  color: var(--blue);
}
.st.done {
  color: var(--green);
}
.st.wait {
  color: var(--amber);
}
.st.danger {
  color: var(--alert);
}
.st.none::before {
  display: none;
}

/* Segmented Controls (.seg) & Chips (.pick, .chip) */
.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--sunken);
  gap: 2px;
}
.seg button,
.seg a {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.seg button[aria-pressed="true"],
.seg button[aria-selected="true"],
.seg a[aria-current="page"],
.seg .on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s, background-color 0.15s;
  cursor: pointer;
}
.pick[aria-pressed="true"],
.pick[aria-checked="true"],
.pick.on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.pick.pick-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ==========================================================================
   FOUNDER ADMIN HOME: RITUALS WIDGET GRID (.adm-home, .wdg)
   ========================================================================== */
.adm-home {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.adm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.wdg {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-width: 0;
}
.wdg-wide {
  grid-column: 1 / -1;
}
.wdg-h {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.wdg-t {
  font: 600 15px/20px var(--f-text);
  color: var(--ink-2);
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.wdg-all {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.wdg-b,
.wdg-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 14px 20px 18px;
}
.wdg-b > .wdg-f {
  margin-top: auto;
}
.wdg-num {
  font: 600 32px/1.1 var(--f-text);
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.wdg-kpi {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 0 0 10px;
}
.wdg-rows,
.wdg-ev {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.wdg-rows > li,
.wdg-ev > li {
  min-width: 0;
}
.wdg-rows > li + li,
.wdg-kpi + .wdg-rows > li:first-child {
  border-top: 1px solid var(--line);
}
.wdg-a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 6px 10px;
  margin: 0 -10px;
  border-radius: 10px;
  color: var(--ink) !important;
  text-decoration: none !important;
  transition: background-color 0.12s;
  cursor: pointer;
  width: calc(100% + 20px);
  border: 0;
  background: transparent;
  text-align: left;
}
.wdg-a .grow,
.wdg-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}
.wdg-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.wdg-sep {
  color: var(--ink-3);
}
.wdg-Course {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wdg-a b:not(.wdg-n) {
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wdg-a small,
.wdg-sub {
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.wdg-val {
  margin-left: auto;
  flex: none;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wdg-val.muted {
  color: var(--ink-3);
  font-weight: 600;
}
.wdg-n,
.wdg-a b.wdg-n {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--blue-soft) !important;
  color: var(--blue-ink) !important;
  border: 1px solid var(--blue-line);
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.wdg-n.solid,
.wdg-a b.wdg-n.solid {
  background: var(--blue) !important;
  color: #FFFFFF !important;
  border-color: transparent;
}
.wdg-n.zero,
.wdg-a b.wdg-n.zero {
  background: var(--sunken) !important;
  color: var(--ink-3) !important;
  border-color: var(--line);
}
.wdg-n.danger,
.wdg-a b.wdg-n.danger {
  background: var(--alert) !important;
  color: #FFFFFF !important;
  border-color: transparent;
}
.wdg-d {
  flex: none;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 4px;
  border-radius: var(--r-sm);
  background: var(--sunken);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.wdg-d b {
  font-size: 13px;
  line-height: 17px;
  font-weight: 600;
}
.wdg-d small {
  font-size: 11px;
  line-height: 14px;
  color: var(--ink-3);
}
.wdg .tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.wdg .tbl td,
.wdg .tbl th {
  text-align: left;
  font-variant-numeric: tabular-nums;
  padding: 11px 16px;
  line-height: 20px;
  border-bottom: 1px solid var(--line);
}
.wdg .tbl tr:last-child td {
  border-bottom: 0;
}
.wdg .tbl th {
  font-weight: 600;
  color: var(--ink-3);
  font-size: 12px;
  background: var(--sunken);
}
.wdg .tbl td:first-child,
.wdg .tbl th:first-child,
.epn .tbl td:first-child,
.epn .tbl th:first-child,
.adm-table td:first-child,
.adm-table th:first-child {
  text-align: left;
  white-space: normal;
  color: var(--ink);
  min-width: 0 !important;
  padding-left: 20px;
}
.wdg .tbl td:last-child,
.wdg .tbl th:last-child {
  padding-right: 20px;
}
.wdg .tbl th + th,
.wdg .tbl td + td {
  padding-left: 16px;
}
.wdg-f {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (hover: hover) {
  .wdg-a:hover {
    background: var(--surface-2);
  }
  .wdg-rows > li:hover,
  .wdg-rows > li:hover + li {
    border-top-color: transparent;
  }
}

@media (max-width: 760px) {
  .adm-home,
  .adm-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .wdg-wide {
    grid-column: auto;
  }
}

/* ==========================================================================
   SINGLE-LINE FILTER BAR (.adm-bar.adm-fbar) & MULTI-SELECT DROPDOWNS (.cal4-dd)
   ========================================================================== */
.adm-bar,
.adm-bar.adm-fbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px 14px !important;
  flex-wrap: wrap !important;
  margin-bottom: 16px !important;
}
.adm-fbar-l,
.adm-fbar .cal4-dds {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.adm-fbar-r,
.adm-bar-r {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin-left: auto;
}
.adm-cnt {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--ink-3);
}
.cal4-dd-wrap {
  position: relative;
  display: inline-flex;
}
.cal4-dd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 600 14px/1 var(--f-text);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.cal4-dd svg {
  color: var(--ink-3);
  transition: transform 0.15s;
}
.cal4-dd.on {
  border-color: var(--cal-c);
  background: var(--cal-c);
  color: var(--cal-on);
}
.cal4-dd.on svg {
  color: var(--cal-on);
}
.cal4-dd[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
@media (hover: hover) {
  .cal4-dd:not(.on):hover {
    background: var(--sunken);
  }
}

.cal4-search {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.cal4-search svg {
  position: absolute;
  left: 13px;
  color: var(--ink-3);
  pointer-events: none;
}
.cal4-search input {
  height: 38px;
  padding: 0 30px 0 36px;
  border: 1px solid var(--line-2) !important;
  border-radius: 999px !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
  font: 500 14px/1 var(--f-text) !important;
  min-width: 210px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cal4-search input:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px var(--sel) !important;
}
.cal4-search-x {
  position: absolute;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.cal4-search-x:hover {
  background: var(--sunken);
  color: var(--ink);
}

/* Popover Dropdown (.pop-dd) */
.pop-dd {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 85;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 8px;
  min-width: 240px;
  max-width: min(340px, calc(100vw - 24px));
  max-height: min(60vh, 380px);
  overflow-y: auto;
  display: grid;
  gap: 2px;
}
.pop-dd .dd-list {
  max-height: min(60vh, 380px);
  overflow: auto;
  display: grid;
  gap: 2px;
}
.dd-i,
.dd-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-weight: 500;
}
.dd-i:hover,
.dd-opt:hover {
  background: var(--surface-2);
}
.dd-opt.on {
  font-weight: 600;
}
.dd-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--line-2);
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface);
  color: transparent;
}
.dd-box.on,
.dd-opt.on .dd-box {
  background: var(--cal-c);
  border-color: var(--cal-c);
  color: var(--cal-on);
}
.dd-n {
  margin-left: auto;
  padding-left: 12px;
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.dd-clear {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  border: 0;
  background: transparent;
  cursor: pointer;
}
.dd-clear:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* ==========================================================================
   UNIFIED LIST CARD & CLICKABLE ROWS (.adm-list, .acr)
   ========================================================================== */
.adm-list {
  padding: 4px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.adm-list .acr {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 -12px;
  padding: 14px 12px;
  border-radius: 12px;
  transition: background-color 0.12s;
  cursor: pointer;
}
.adm-list .acr + .acr::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  border-top: 1px solid var(--line);
}
@media (hover: hover) {
  .adm-list .acr:hover {
    background: var(--surface-2);
  }
  .adm-list .acr:hover::before,
  .adm-list .acr:hover + .acr::before {
    border-top-color: transparent;
  }
}
.acr-av {
  flex: none;
}
.acr-main {
  flex: 1 1 auto;
  min-width: 0;
}
.acr-t,
.acr-main > b {
  display: block;
  font-size: 15px;
  line-height: 21px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none !important;
}
.acr-m {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-top: 4px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
}
.acr-m > span + span::before {
  content: "·";
  margin-right: 12px;
  color: var(--ink-3);
}
.acr-a {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 10px;
  max-width: 46%;
}
.mod-about {
  margin-top: 6px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 760px) {
  .adm-list {
    padding: 4px 16px;
  }
  .adm-list .acr {
    flex-wrap: wrap;
    gap: 10px 12px;
  }
  .acr-a {
    flex: 1 1 100%;
    justify-content: flex-start;
    max-width: none;
  }
}

/* ==========================================================================
   RIGHT SLIDE-OVER INSPECTOR PANEL (.epn-wrap, .epn)
   ========================================================================== */
.epn-wrap {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--scrim);
  animation: k-fade 0.15s ease-out;
}
.epn-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  animation: k-fade 0.15s ease-out;
  border: 0;
  width: 100%;
  height: 100%;
  cursor: default;
}
.epn {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(480px, calc(100vw - 24px));
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  animation: k-slideR 0.2s ease-out;
  overflow: hidden;
  border: 1px solid var(--line);
}
.epn > .epn-h {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line);
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.epn-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
}
.epn-t {
  font: 700 20px/26px var(--f-text);
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
}
.epn-sub {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
  margin: 0;
}
.epn-x {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: var(--ink-3);
  background: transparent;
  border: 0;
  cursor: pointer;
  margin-left: auto;
  flex: none;
}
.epn-x:hover {
  background: var(--sunken);
  color: var(--ink);
}
.epn-kick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--ink-3);
}
.epn-b {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 22px 24px;
  overscroll-behavior: contain;
}
.epn-rows {
  margin: 4px 0 0;
  display: grid;
}
.epn-rows > div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.epn-rows > div:first-child {
  border-top: 0;
}
.epn-rows > div:last-child {
  border-bottom: 1px solid var(--line);
}
.epn-rows dt {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--ink-3);
  padding-top: 1px;
}
.epn-rows dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  line-height: 20px;
  min-width: 0;
}
.epn-rows dd b {
  color: var(--ink);
  font-weight: 600;
}
.epn-rows dd span {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.epn-host {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--ink);
  text-decoration: none !important;
  transition: border-color 0.15s;
}
.epn-host:hover {
  border-color: var(--ink-3);
}
.epn-sec {
  margin-top: 18px;
}
.epn-sh {
  font: 600 15px/20px var(--f-text);
  color: var(--ink);
  margin-bottom: 8px;
}
.epn-f {
  flex: none;
  padding: 14px 22px 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.mod-dec {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.mod-dec .btn-primary {
  flex: 1 1 auto;
}

@keyframes k-fade {
  from { opacity: 0; }
}
@keyframes k-slideR {
  from { transform: translateX(24px); opacity: 0.6; }
}

@media (max-width: 640px) {
  .epn {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    border-radius: 0;
  }
}

/* ==========================================================================
   RITUALS 2-COLUMN CHAT & MESSAGES (.ch-wrap, .ch, .ch-list, .ch-conv)
   Ported 1:1 from src/club_chat.css
   ========================================================================== */
.ch-wrap {
  container: chw / inline-size;
  position: relative;
  height: calc(100vh - 36px);
  height: calc(100dvh - 36px);
  border-top: 1px solid var(--line);
}
.ch {
  display: grid;
  grid-template-columns: clamp(320px, calc(100% - 681px), 360px) minmax(0, 1fr);
  height: 100%;
  background: var(--paper);
}
.ch-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--paper);
}
.ch-ls {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
.ch-q {
  padding: 16px 16px 12px;
}
.ch-qi {
  position: relative;
  display: block;
}
.ch-qi > svg {
  position: absolute;
  left: 12px;
  top: 11px;
  color: var(--ink-3);
  pointer-events: none;
}
.ch-qi input {
  display: block;
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--sunken);
  padding: 0 12px 0 38px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.ch-qi input:focus,
.ch-qi input:not(:placeholder-shown) {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.ch-ul {
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
}
.ch-it {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 8px 16px;
  color: inherit;
  text-decoration: none !important;
  cursor: pointer;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  transition: background-color 0.12s;
}
.ch-it:hover {
  background: var(--surface-2);
}
.ch-it[aria-current="true"],
.ch-it.active {
  background: var(--sel);
}
.ch-it .av {
  width: 52px;
  height: 52px;
  font-size: 17px;
}
.ch-it .grow {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ch-r1,
.ch-r2 {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.ch-r1 b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 15px;
  line-height: 21px;
  color: var(--ink);
}
.ch-t {
  flex: none;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
}
.ch-pv {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 19px;
  color: var(--ink-3);
}
.ch-u {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.ch-conv {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
}
.ch-col {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}
.ch-head {
  --ch-hh: 76px;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  height: calc(var(--ch-hh) + 12px);
  pointer-events: none;
  background: var(--ch-glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(#000 var(--ch-hh), transparent);
  mask-image: linear-gradient(#000 var(--ch-hh), transparent);
}
.ch-hd {
  height: var(--ch-hh);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  pointer-events: auto;
}
.ch-who {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none !important;
}
.ch-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
}
.ch-pill:hover {
  background: var(--sunken);
}
.ch-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 84px 0 110px;
  overscroll-behavior: contain;
}
.ch-flow {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 20px;
}
.ch-flow > :first-child {
  margin-top: auto;
}
.ch-m {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: calc(100% - 80px);
}
.ch-m.in {
  align-self: flex-start;
}
.ch-m.me {
  align-self: flex-end;
}
.ch-m.in + .ch-m.me,
.ch-m.me + .ch-m.in {
  margin-top: 10px;
}
.ch-b {
  min-width: 0;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--sunken);
  font-size: 15px;
  line-height: 21px;
  color: var(--ink);
}
.ch-m.me .ch-b {
  background: var(--blue-soft);
  border-color: var(--ch-me-line);
}
.ch-m.in .ch-b.ch-nt {
  background: var(--surface);
  padding: 12px 16px;
}
.ch-tm {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-3);
}
.ch-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
}
.ch-fc {
  padding: 0 20px;
}
.ch-in {
  position: relative;
  display: block;
  pointer-events: auto;
  padding: 20px 68px 22px 20px;
  cursor: text;
  background: var(--blue-soft);
  border-radius: 32px 32px 0 0;
  box-shadow: 0 4px 12px rgba(10, 14, 44, 0.06);
}
.ch-in textarea {
  display: block;
  width: 100%;
  min-height: 22px;
  resize: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  line-height: 21px;
  padding: 0;
  color: var(--ink);
  outline: none;
}
.ch-send {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: var(--on-blue);
  border: 0;
  cursor: pointer;
}
.ch-send:disabled {
  background: var(--ch-send-off);
  color: var(--ink-3);
  cursor: default;
}

/* ==========================================================================
   LEGACY CRM TABLE, KANBAN & FORM OVERRIDES (Clean Rituals Look)
   ========================================================================== */
.tbl-wrap,
.panel,
.kcard,
.board-col {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: none !important;
}

select,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="url"],
input[type="date"],
textarea {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: var(--f-text);
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--blue) !important;
  outline: 2px solid var(--sel) !important;
  outline-offset: 0 !important;
}

/* ==========================================================================
   ALIASES FOR KOSTYA CHAT, STATUS PILLS, ADMIN TABLES, KANBAN & DRAWERS
   ========================================================================== */

/* Status pill aliases (.st-ok, .st-warn, .st-live, .st-err, .st-muted) */
.st.st-ok,
.st-ok {
  color: var(--green);
}
.st.st-warn,
.st-warn {
  color: var(--amber);
}
.st.st-live,
.st-live {
  color: var(--blue);
}
.st.st-err,
.st-err {
  color: var(--alert);
}
.st.st-muted,
.st-muted {
  color: var(--ink-3);
}

/* Avatar size aliases (.av-sm, .av-md, .av-lg) */
.av.av-sm,
.av-sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.av.av-md,
.av-md {
  width: 36px;
  height: 36px;
  font-size: 13px;
}
.av.av-lg,
.av-lg {
  width: 44px;
  height: 44px;
  font-size: 15px;
}

/* Admin Table (.adm-table) inside .wdg or .card */
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.adm-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.adm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
.adm-table tbody tr:last-child td {
  border-bottom: 0;
}
.adm-table tbody tr:hover td {
  background: var(--surface-2);
}

/* Chat aliases (.ch-list-h, .ch-items, .ch-i, .ch-msgs, .ch-in-row, .ch-ta) */
.ch-list-h {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ch-items {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 0 12px;
}
.ch-i {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none !important;
  cursor: pointer;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  transition: background-color 0.12s;
}
.ch-i:hover {
  background: var(--surface-2);
}
.ch-i.on,
.ch-i[aria-current="true"] {
  background: var(--sel);
}
.ch-i-body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ch-i-top,
.ch-i-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.ch-i-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-i-t {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  flex: none;
}
.ch-i-last {
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.ch-i-cnt {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--on-blue);
  font-size: 11px;
  font-weight: 700;
}
.ch-conv > .ch-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}
.ch-col > .ch-head {
  position: sticky;
  top: 0;
  height: auto;
  min-height: 64px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ch-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  pointer-events: auto;
  mask-image: none;
  -webkit-mask-image: none;
}
.ch-head-t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ch-head-t b {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-head-t small {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-back {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  place-items: center;
  cursor: pointer;
}
@media (max-width: 900px) {
  .ch-back {
    display: inline-grid;
  }
}
.ch-msgs {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ch-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--ink-3);
}
.ch-col > .ch-in {
  margin: 0 16px;
  padding: 14px 18px 16px;
  border-radius: 24px 24px 0 0;
  background: var(--blue-soft);
  border: 1px solid var(--ch-me-line);
  border-bottom: 0;
}
.ch-in-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.ch-ta {
  flex: 1;
  border: 0 !important;
  background: transparent !important;
  resize: none;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink);
  outline: none !important;
  box-shadow: none !important;
  padding: 4px 0;
}
.ch-in-row .ch-send {
  position: static;
  flex: none;
  width: 40px;
  height: 40px;
}

/* Global Page Headers (.phead), Pills (.pill), Drawers (.phx-drawer) & Search (.phx-search) */
.phead {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.phead h1,
.phead__title {
  font-family: var(--f-display) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  color: var(--ink) !important;
}
.pill {
  border-radius: 999px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}
.phx-drawer,
.ps-box,
.modal__box {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  color: var(--ink) !important;
  box-shadow: var(--sh-pop) !important;
}
.login {
  background: var(--paper) !important;
  color: var(--ink) !important;
}
.login .lp {
  background: var(--surface-2) !important;
  border-right: 1px solid var(--line) !important;
}
.login .rp {
  background: var(--surface) !important;
}

/* ==========================================================================
   KOSTYA v4.9 PAGE HEADERS (.adm-header, .adm-H1, .adm-Sub) & WIDGET GRIDS
   ========================================================================== */
.adm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.adm-H1 {
  font: 700 26px/32px var(--f-text);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.adm-Sub {
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-3);
  margin: 0;
}
.wdg-grid {
  display: grid;
  gap: 16px;
  align-items: stretch;
}
.wdg-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.wdg-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.wdg-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1120px) {
  .wdg-grid-4,
  .wdg-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .wdg-grid-4,
  .wdg-grid-3,
  .wdg-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   TABS & SEGMENTED TABS (.tabs, .seg.tabs, .tab)
   ========================================================================== */
.tabs:not(.seg) {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: 12px 0 20px;
}
.tabs:not(.seg) .tab {
  position: relative;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.tabs:not(.seg) .tab:hover {
  color: var(--ink);
  background: var(--surface-2) !important;
}
.tabs:not(.seg) .tab[aria-selected="true"] {
  color: var(--blue);
}
.tabs:not(.seg) .tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue) !important;
  box-shadow: none !important;
}
.seg.tabs {
  border-bottom: 0 !important;
  margin: 0 !important;
}
.seg.tabs .tab::after,
.seg .tab[aria-selected="true"]::after {
  display: none !important;
  content: none !important;
}

/* ==========================================================================
   CHAT HEADER & COMPOSER FIXES (.ch-who, .ch-hd, .ch-head)
   ========================================================================== */
.ch-conv {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.ch-who,
.ch-who.ch-head-t {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 1 220px !important;
  min-width: 0 !important;
}
.ch-head {
  position: relative !important;
  flex: none !important;
  height: auto !important;
  min-height: 68px !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid var(--line) !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
.ch-hd {
  height: auto !important;
  min-height: 52px !important;
  max-width: 960px !important;
  flex-wrap: wrap !important;
  gap: 10px 14px !important;
}
.ch-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 20px 0 24px !important;
}
.ch-foot {
  position: relative !important;
  flex: none !important;
  padding-top: 4px;
  background: var(--paper);
}
.ch-conv .ch-col {
  max-width: 920px !important;
}
/* Reset legacy .vb bubble on .ch-m wrapper so only .ch-b is the message bubble */
.ch-m.vb,
.ch-m.vb.lead,
.ch-m.vb.bot,
.ch-m.vb.human,
.ch-m.vb.stop {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  max-width: 78% !important;
}
/* Prevent form input height rule from stretching checkboxes and radios */
input[type="checkbox"],
input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  padding: 0 !important;
  flex: 0 0 16px !important;
  border-radius: 4px !important;
  accent-color: var(--blue) !important;
}
/* Prevent .pband and .set-grid from overflowing right edge */
.pband {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  max-width: 100% !important;
}
.pband > *,
.pband__card,
.pb-body {
  min-width: 0 !important;
  max-width: 100% !important;
}
.pb-t {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
.set-grid {
  display: grid !important;
  grid-template-columns: 200px minmax(0, 1fr) !important;
  gap: 20px !important;
  max-width: 100% !important;
}
.set-grid > * {
  min-width: 0 !important;
  max-width: 100% !important;
}
.tbl-wrap,
.twrap,
.card.adm-list,
.adm-table-wrap {
  overflow-x: auto !important;
  max-width: 100% !important;
}
.tbl th,
.tbl td,
.adm-table th,
.adm-table td {
  padding: 10px 10px !important;
}
.scrim {
  display: none;
}
@media (max-width: 960px) {
  .shell.nav-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 71;
    background: var(--scrim);
  }
}

/* ==========================================================================
   KOSTYA v4.9 BREADCRUMBS & CONNECTED HUB SUB-NAVIGATION (.k-bc-*)
   ========================================================================== */
.k-bc-shell {
  position: sticky;
  top: 0;
  z-index: 32;
  background: var(--ch-glass, rgba(250, 250, 250, 0.88));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 8px 24px;
}
.k-bc-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}
.k-bc-trail {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.k-bc-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--ink-2) !important;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.14s, border-color 0.14s, color 0.14s;
  flex: none;
}
.k-bc-back:hover {
  background: var(--surface-2);
  border-color: var(--ink-3);
  color: var(--ink) !important;
}
.k-bc-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.k-bc-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 18px;
  min-width: 0;
}
.k-bc-sep {
  color: var(--ink-3);
  font-size: 13px;
  user-select: none;
}
.k-bc-link {
  color: var(--ink-3) !important;
  font-weight: 500;
  text-decoration: none !important;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.12s, background-color 0.12s;
  white-space: nowrap;
}
.k-bc-link:hover {
  color: var(--blue) !important;
  background: var(--blue-soft);
}
.k-bc-cur {
  color: var(--ink);
  font-weight: 700;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}
.k-bc-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow-x: auto;
  max-width: 100%;
}
.k-bc-tab {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2) !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.k-bc-tab:hover {
  color: var(--ink) !important;
}
.k-bc-tab.on {
  background: var(--surface);
  color: var(--blue-ink) !important;
  box-shadow: 0 1px 3px rgba(10, 14, 44, 0.08);
}
@media (max-width: 960px) {
  .k-bc-shell {
    top: 56px;
    padding: 6px 14px;
  }
}




/* ============================================================
   RTL (Arabic `dir="rtl"`) GEOMETRY & ALIGNMENT OVERRIDES
   ============================================================ */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}
html[dir="rtl"] .sn,
html[dir="rtl"] .snav,
html[dir="rtl"] .snav.sidebar {
  border-right: none !important;
  border-left: 1px solid var(--nav-line) !important;
}
html[dir="rtl"] .sn-gl,
html[dir="rtl"] .sn-sec {
  text-align: right !important;
}
html[dir="rtl"] .sn-i,
html[dir="rtl"] .sn-i.nav-item,
html[dir="rtl"] .sn-i > .sn-t,
html[dir="rtl"] .sn-foot .sn-u-meta {
  text-align: right !important;
}
html[dir="rtl"] .sn-badge,
html[dir="rtl"] .sn-i .nav-item__badge {
  margin-left: 0 !important;
  margin-right: auto !important;
}
html[dir="rtl"] .k-bc-sep,
html[dir="rtl"] .k-bc-back svg {
  transform: scaleX(-1);
  display: inline-block;
}
html[dir="rtl"] .epn {
  right: auto;
  left: 12px;
  box-shadow: 24px 0 60px rgba(10, 14, 44, 0.14);
}
html[dir="rtl"] .epn-x {
  right: auto;
  left: 14px;
}
@media (max-width: 1180px) {
  html[dir="rtl"] .snav,
  html[dir="rtl"] .snav.sidebar {
    left: auto !important;
    right: 0 !important;
    transform: translateX(102%);
  }
  html[dir="rtl"] .snav.open,
  html[dir="rtl"] .snav.sidebar.open,
  html[dir="rtl"] .app.expanded .snav {
    transform: translateX(0);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.45);
  }
}

/* ==========================================================================
   TECHPRED SPA SHELL BRIDGE FOR KOSTYA v4.9 (1:1 crm.hamidun.com)
   ========================================================================== */
:root,
:root[data-theme="light"] {
  --bg-0: var(--paper);
  --bg-1: var(--surface);
  --bg-2: var(--surface-2);
  --bg-3: var(--sunken);
  --card: var(--surface);
  --card-hover: var(--surface-2);
  --bg2: var(--surface-2);
  --fg: var(--ink);
  --text: var(--ink);
  --muted: var(--ink-2);
  --dim: var(--ink-3);
  --border: var(--line);
  --border-hi: var(--line-2);
  --accent: var(--blue);
  --accent-light: var(--blue);
  --accent-bg: var(--blue-soft);
  --cyan: #0284c7;
  --green: var(--ok);
  --orange: var(--warn);
  --red: var(--alert);
}
:root[data-theme="dark"] {
  --bg-0: var(--paper);
  --bg-1: var(--surface);
  --bg-2: var(--surface-2);
  --bg-3: var(--sunken);
  --card: var(--surface);
  --card-hover: var(--surface-2);
  --bg2: var(--surface-2);
  --fg: var(--ink);
  --text: var(--ink);
  --muted: var(--ink-2);
  --dim: var(--ink-3);
  --border: var(--line);
  --border-hi: var(--line-2);
  --accent: var(--blue);
  --accent-light: #60a5fa;
  --accent-bg: var(--blue-soft);
  --cyan: #38bdf8;
  --green: var(--ok);
  --orange: var(--warn);
  --red: var(--alert);
}
:root,
:root[data-theme="light"],
:root[data-theme="dark"] {
  --font-oswald: "Oswald";
  --font-inter-tight: "Inter Tight";
  --font-manrope: "Manrope";
  --font-jbmono: "JetBrains Mono";
  --font-display: "Oswald", "Inter Tight", "Arial Narrow", sans-serif;
  --font-ui: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}
html, body, .shell, .smain {
  font-family: var(--f-text) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100vh !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
}
.snav,
.snav.sidebar {
  font-family: var(--f-text) !important;
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}
.snav .sn-top {
  height: 52px !important;
  border-bottom: 1px solid var(--nav-line);
}
.snav .sn-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 6px 10px 8px !important;
}
.snav .sn-grp + .sn-grp {
  margin-top: 4px !important;
}
.snav .sn-gl,
.snav .sn-sec {
  padding: 2px 10px !important;
  margin: 0 !important;
  font-size: 10.5px !important;
  line-height: 14px !important;
}
.snav .sn-body .sn-i,
.snav .sn-body .sn-i.nav-item {
  min-height: 31px !important;
  padding: 4px 10px !important;
  font-size: 13.5px !important;
  line-height: 18px !important;
}
.snav .sn-user {
  padding: 5px 10px !important;
}
.snav .sn-me {
  min-height: 42px !important;
  padding: 4px 8px !important;
}
.snav .sn-foot {
  padding: 4px 10px 6px !important;
}
.snav .sn-foot .sn-i {
  min-height: 27px !important;
  padding: 3px 10px !important;
  font-size: 12.5px !important;
}
.wdg .tbl-wrap {
  padding: 0 8px;
}
.wdg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  margin: 0 -8px;
  border-radius: 10px;
  color: var(--ink);
  transition: background-color 0.12s;
}
.cal4-search {
  min-width: 340px !important;
  flex: 1 1 340px;
  max-width: 440px;
}
.cal4-search input {
  width: 100% !important;
  min-width: 290px !important;
}
.kanban-col-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}
.kanban-col-header > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kanban-col-header > .count {
  flex-shrink: 0;
}
.login-page {
  background: var(--paper) !important;
  color: var(--ink) !important;
}
.login-card {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--sh-lg) !important;
  color: var(--ink) !important;
}
.login-logo {
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain;
}
.login-title {
  color: var(--ink) !important;
}
.login-sub,
.login-foot {
  color: var(--ink-3) !important;
}
.wdg-row + .wdg-row {
  border-top: 1px solid var(--line);
}
.wdg-row:hover {
  background: var(--surface-2);
}
.wdg-l {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  gap: 2px;
}
.wdg-l > .b {
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink);
}
.shell.app {
  display: flex !important;
  grid-template-columns: none !important;
  width: 100% !important;
  min-height: 100vh !important;
  height: auto !important;
}
.shell.app.nav-min .snav.sidebar {
  width: var(--nav-min) !important;
}
.shell.app.nav-min .sn-t,
.shell.app.nav-min .sn-badge,
.shell.app.nav-min .sn-gl,
.shell.app.nav-min .sn-sec,
.shell.app.nav-min .logo-word,
.shell.app.nav-min .logo-tag,
.shell.app.nav-min .sn-me > div:not(.av),
.shell.app.nav-min .sn-foot .sn-i > span:not(.sn-ic) {
  display: none !important;
}
.smain.main {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
  background: var(--paper) !important;
}
.smain.main > .content {
  flex: 1 1 auto !important;
  overflow: visible !important;
  padding: 0 !important;
}
.k-bc-tab {
  cursor: pointer;
  border: 0;
  background: transparent;
  font-family: inherit;
}
.k-bc-back {
  cursor: pointer;
  font-family: inherit;
}
