/* Sellora CRM — extras on top of Excelloite (kanban, calendar, tables, roles) */

body.k-app a,
body.k-app a:link,
body.k-app a:visited,
body.k-app a:hover,
body.k-app a:focus,
body.k-app a:active {
  text-decoration: none !important;
}

/* Lock chrome sizes to prototype desktop tokens (excelloite.css .k-sidebar /
   .k-topbar). Literal px — not Tailwind w-* — so flex/content cannot stretch them. */
.k-sidebar {
  width: 248px;
  min-width: 248px;
  max-width: 248px;
  flex-grow: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  background: #faf9f7;
  border-right: 1px solid #ebe8e3;
}

.k-sidebar .k-brand {
  padding: 20px 16px 16px;
  gap: 12px;
}

.k-sidebar .k-brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.02em;
  background: linear-gradient(145deg, #ff5c1a 0%, #e04400 100%);
  box-shadow: 0 1px 2px rgba(224, 68, 0, 0.18);
}

.k-sidebar .k-brand__title {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--k-text);
}

.k-sidebar .k-brand__sub {
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--k-muted-2);
  margin-top: 1px;
}

.k-topbar {
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.k-modal__panel--lg {
  width: min(720px, 100%);
  max-height: min(92vh, 820px);
}

.k-modal__panel > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.k-modal__panel > form > .k-modal__body {
  flex: 1;
  min-height: 0;
}

.k-modal__panel--sm {
  width: min(440px, 100%);
}

.k-pagination__left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.k-pagination__size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  color: var(--k-muted);
}

.k-pagination__size-select {
  width: auto;
  min-width: 72px;
  max-width: 88px;
  height: 32px;
  padding: 0 28px 0 10px;
  font-size: 12.5px;
}

.k-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 56px 28px;
  color: var(--k-text-2);
  background:
    radial-gradient(ellipse at center, rgba(255, 77, 0, 0.04) 0%, transparent 65%);
}

.k-empty[hidden] {
  display: none !important;
}

.k-empty__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 77, 0, 0.08);
  border: 1px solid rgba(255, 77, 0, 0.12);
  margin-bottom: 8px;
}

.k-empty__icon i {
  font-size: 26px;
  color: var(--k-orange, #ff4d00);
  display: block;
  margin: 0;
}

.k-empty__title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--k-text);
  letter-spacing: -0.01em;
}

.k-empty__hint {
  margin: 0;
  max-width: 320px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--k-muted, #8a8f98);
}

.k-table-scroll[hidden],
.k-pagination[hidden] {
  display: none !important;
}

.k-th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.k-th-sort:hover {
  color: var(--k-purple);
}

.k-th-sort.is-asc::after,
.k-th-sort.is-desc::after {
  content: " ↑";
  font-size: 11px;
  color: var(--k-purple);
}

.k-th-sort.is-desc::after {
  content: " ↓";
}

.k-role-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-radius);
  background: var(--k-purple-soft);
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--k-text-2);
}

.k-role-banner i {
  color: var(--k-purple);
  font-size: 18px;
}

.k-scope-select {
  max-width: 200px;
  height: 32px;
  font-size: 12px;
}

.k-kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.k-kanban--4 {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
}

.k-due--overdue {
  color: var(--k-red);
  font-weight: 650;
}

.k-due--today {
  color: #b45309;
  font-weight: 600;
}

.k-kanban__col {
  background: #f3f1ed;
  border: 1px solid var(--k-border);
  border-radius: var(--k-radius);
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.k-kanban__head {
  padding: 12px 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.k-kanban__head strong {
  font-size: 13px;
}

.k-kanban__sum {
  font-size: 11px;
  color: var(--k-muted);
  font-variant-numeric: tabular-nums;
}

.k-kanban__cards {
  padding: 0 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 80px;
}

.k-deal {
  background: #fff;
  border: 1px solid var(--k-border);
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--k-shadow);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.k-deal:hover {
  border-color: #FFC4A8;
}

.k-deal.is-dragging {
  opacity: 0.4;
  pointer-events: none;
}

.k-deal--ghost {
  margin: 0;
  opacity: 0.95;
  cursor: grabbing;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  z-index: 10000;
}

.k-kanban.is-dnd {
  cursor: grabbing;
  user-select: none;
}

.k-kanban__col.is-drop-target {
  border-color: var(--k-purple);
  background: #fff6f1;
}

.k-deal__title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
}

.k-deal__meta {
  font-size: 12px;
  color: var(--k-muted);
  margin: 0 0 8px;
}

.k-deal__meta--stats {
  margin: -4px 0 8px;
  font-size: 11px;
  line-height: 1.35;
}

.k-deal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.k-deal__value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.k-deal__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--k-border);
  overflow: visible;
}

.k-deal__actions > form {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
}

.k-deal .k-icon-btn {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  flex: 0 0 auto;
}

.k-deal .k-icon-btn i {
  font-size: 13px;
}

.k-cal-wrap {
  padding: 16px;
}

.k-cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 14px;
}

.k-cal__key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--k-text-2);
}

.k-cal__key::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #94a3b8;
}

.k-cal__key--meeting::before { background: #FF4D00; }
.k-cal__key--call::before { background: #2563eb; }
.k-cal__key--followup::before { background: #d97706; }
.k-cal__key--email::before { background: #0ea5e9; }
.k-cal__key--note::before { background: #16a34a; }

.k-cal__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.k-cal__toolbar h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.k-cal__weekdays,
.k-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.k-cal__weekdays span {
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--k-muted);
  text-align: center;
}

.k-cal__grid {
  border: 1px solid var(--k-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--k-border);
  gap: 1px;
}

.k-cal__cell {
  min-height: 128px;
  background: #fff;
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  cursor: pointer;
}

.k-cal__cell.is-muted {
  background: #f7f6f3;
}

.k-cal__cell.is-today {
  background: #FFF1EA;
  box-shadow: inset 0 0 0 2px rgba(255, 77, 0, 0.35);
}

.k-cal__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.k-cal__cell.is-today .k-cal__num {
  background: var(--k-purple);
  color: #fff;
}

.k-cal__chips {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.k-cal__chip {
  appearance: none;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 6px;
  padding: 5px 7px;
  text-align: left;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: #1e1b4b;
  cursor: pointer;
  white-space: normal;
  overflow: hidden;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.k-cal__chip:hover {
  filter: brightness(0.96);
}

.k-cal__chip--meeting { background: #FFE8DC; color: #C43A00; }
.k-cal__chip--call { background: #dbeafe; color: #1d4ed8; }
.k-cal__chip--follow-up,
.k-cal__chip--followup { background: #ffedd5; color: #c2410c; }
.k-cal__chip--email { background: #e0f2fe; color: #0369a1; }
.k-cal__chip--note { background: #dcfce7; color: #15803d; }
.k-cal__chip--more {
  background: transparent;
  color: var(--k-purple);
  padding: 2px 7px;
  font-weight: 700;
}

.k-cal__time {
  display: block;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.8;
}

.k-cal-day-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(55vh, 420px);
  overflow-y: auto;
  padding-right: 2px;
}

.k-cal-day-list button {
  appearance: none;
  border: 1px solid var(--k-border);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.k-cal-day-list button:hover {
  border-color: #FFC4A8;
  background: var(--k-purple-soft);
}

@media (max-width: 900px) {
  .k-cal__cell {
    min-height: 96px;
    padding: 6px;
  }
  .k-cal__chip {
    font-size: 10px;
    -webkit-line-clamp: 1;
  }
}

.k-perm-table td,
.k-perm-table th {
  text-align: center;
}

.k-perm-table td:first-child,
.k-perm-table th:first-child {
  text-align: left;
}

.k-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--k-text);
}

.k-timeline li {
  position: relative;
  padding: 0 0 16px 20px;
  border-left: 2px solid var(--k-border);
  margin-left: 8px;
}

.k-timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.k-timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--k-purple);
}

.k-attach {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--k-border);
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
}

.k-attach i {
  font-size: 18px;
  color: var(--k-purple);
}

.k-nav [data-roles] {
  display: none;
}

body[data-user-role="super_admin"] .k-nav [data-roles*="super_admin"],
body[data-user-role="admin"] .k-nav [data-roles*="admin"],
body[data-user-role="sales_manager"] .k-nav [data-roles*="sales_manager"],
body[data-user-role="staff"] .k-nav [data-roles*="staff"] {
  display: list-item;
}

body[data-user-role="super_admin"] .k-nav-section[data-roles],
body[data-user-role="admin"] .k-nav-section[data-roles],
body[data-user-role="sales_manager"] .k-nav-section[data-roles],
body[data-user-role="staff"] .k-nav-section[data-roles] {
  display: none;
}

body[data-user-role="super_admin"] .k-nav-section[data-roles*="super_admin"],
body[data-user-role="admin"] .k-nav-section[data-roles*="admin"],
body[data-user-role="sales_manager"] .k-nav-section[data-roles*="sales_manager"],
body[data-user-role="staff"] .k-nav-section[data-roles*="staff"] {
  display: block;
}

.k-nav {
  flex: 1 1 auto;
  padding: 4px 12px 16px;
}

.k-nav > li > a {
  font-weight: 400;
  font-size: 13px;
  color: var(--k-text-2);
  border-radius: 8px;
  border: 0;
  padding: 8px 10px;
  margin-bottom: 1px;
}

.k-nav > li > a i {
  color: var(--k-muted);
  opacity: 0.9;
}

.k-nav a:hover {
  background: rgba(20, 20, 20, 0.04);
  color: var(--k-text);
}

.k-nav a.active,
.k-nav a.active.tint {
  background: rgba(255, 77, 0, 0.08);
  border-color: transparent;
  color: var(--k-purple-deep);
  font-weight: 500;
  box-shadow: none;
}

.k-nav a.active i,
.k-nav a.active.tint i {
  color: var(--k-purple);
}

.k-nav a.active.bar::before {
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 2px;
  background: var(--k-purple);
  opacity: 0.85;
}

.k-nav__group {
  margin-bottom: 6px;
}

.k-nav__parent {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--k-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.k-nav__parent span {
  font-weight: 500;
}

.k-nav__parent > i:first-child {
  font-size: 14px;
  width: 16px;
  text-align: center;
  color: var(--k-muted-2);
}

.k-nav__parent:hover {
  background: rgba(20, 20, 20, 0.035);
  color: var(--k-text-2);
}

.k-nav__parent:hover > i:first-child {
  color: var(--k-muted);
}

.k-nav__group.is-open > .k-nav__parent {
  background: transparent;
  color: var(--k-text-2);
}

.k-nav__group.is-open > .k-nav__parent > i:first-child {
  color: var(--k-purple);
}

.k-nav__caret {
  margin-left: auto;
  font-size: 11px !important;
  width: 12px !important;
  color: var(--k-muted-2) !important;
  transition: transform 0.15s ease;
  opacity: 0.8;
}

.k-nav__group.is-open > .k-nav__parent .k-nav__caret {
  transform: rotate(180deg);
  color: var(--k-muted) !important;
}

.k-nav__sub {
  display: none;
  list-style: none;
  margin: 2px 0 4px 12px;
  padding: 0 0 4px 10px;
  border-left: 1px solid #e6e3de;
}

.k-nav__group.is-open > .k-nav__sub {
  display: block;
}

.k-nav__sub a {
  font-size: 13px;
  font-weight: 400;
  padding: 6px 10px;
  margin-bottom: 1px;
  border-radius: 7px;
  border: 0;
  color: var(--k-text-2);
}

.k-nav__sub a i {
  font-size: 15px;
  width: 16px;
  color: var(--k-muted-2);
}

.k-nav__sub a.active,
.k-nav__sub a.active.tint {
  background: rgba(255, 77, 0, 0.09);
  color: var(--k-purple-deep);
  font-weight: 500;
}

.k-nav__sub a.active.bar::before {
  display: none;
}

.k-sidebar-foot {
  padding: 12px 14px 14px;
  border-top: 1px solid #ebe8e3;
  background: #faf9f7;
  gap: 10px;
}

.k-sidebar-foot .k-avatar {
  width: 30px;
  height: 30px;
  font-weight: 500;
  background: #ece8e2;
  color: var(--k-text-2);
}

.k-sidebar-foot .k-user-meta strong {
  font-weight: 500;
  font-size: 12.5px;
  color: var(--k-text);
}

.k-sidebar-foot .k-user-meta span {
  font-weight: 400;
  font-size: 10.5px;
  color: var(--k-muted);
  margin-top: 1px;
}

.k-filter-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.k-filter-grid > * {
  flex: 0 0 auto;
}

.k-filter-grid .k-search {
  width: 240px;
  min-width: 220px;
  max-width: none;
}

.k-filter-grid .k-input,
.k-filter-grid .k-select {
  width: 160px;
  min-width: 160px;
  max-width: none;
}

.k-filter-grid .k-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.k-card > .k-table-toolbar {
  margin-bottom: 0;
}

.k-data-table .k-table-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.k-data-table .k-table-toolbar > * {
  flex: 0 0 auto;
}

.k-data-table .k-table-toolbar .k-search {
  flex: 1 1 auto;
  width: auto;
  min-width: 180px;
  max-width: none;
}

.k-filter-field {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.k-filter-field__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--k-muted);
  line-height: 1.2;
  white-space: nowrap;
}

.k-filter-field--search {
  flex: 1 1 220px;
  min-width: 180px;
}

.k-filter-field--search .k-search {
  width: 100%;
  min-width: 0;
}

.k-filter-field .k-input,
.k-filter-field .k-select {
  width: 160px;
  min-width: 140px;
  max-width: none;
}

.k-filter-field--search .k-input {
  width: 100%;
}

.k-data-table .k-table-toolbar .k-input,
.k-data-table .k-table-toolbar .k-select {
  width: 160px;
  min-width: 140px;
  max-width: none;
}

.k-date-range {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.k-page-actions .k-date-range {
  margin-right: 4px;
}

.k-page-actions {
  flex-wrap: wrap;
  row-gap: 8px;
  align-items: flex-end;
}

.k-date-range .k-input[type="date"] {
  width: 150px;
  min-width: 150px;
}

@media (max-width: 1024px) {
  .k-data-table .k-table-toolbar {
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: nowrap;
  }

  .k-data-table .k-table-toolbar .k-search,
  .k-filter-field--search {
    flex: 0 0 220px;
    width: 220px;
    max-width: none;
  }
}

.k-muted {
  color: var(--k-muted);
  font-size: 13px;
}

@media (max-width: 1024px) {
  .k-table-toolbar.k-filter-grid {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
  }

  .k-filter-grid .k-search {
    flex: 0 0 240px;
    width: 240px;
    max-width: none;
  }

  .k-filter-grid .k-input,
  .k-filter-grid .k-select {
    flex: 0 0 160px;
  }
}

@media (max-width: 768px) {
  .k-data-table .k-table-toolbar,
  .k-table-toolbar.k-filter-grid,
  .k-filter-grid {
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: wrap !important;
    overflow-x: visible;
    gap: 10px;
  }

  .k-filter-grid > * {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .k-data-table .k-table-toolbar .k-search,
  .k-filter-field--search,
  .k-filter-grid .k-search,
  .k-filter-grid .k-input,
  .k-filter-grid .k-select,
  .k-filter-grid select,
  .k-filter-grid input[type="search"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 100% !important;
  }

  .k-filter-field {
    width: 100%;
  }

  .k-filter-field .k-input,
  .k-filter-field .k-select {
    width: 100%;
  }
}

@media (max-width: 1100px) {
  .k-kanban {
    grid-template-columns: repeat(6, 220px);
  }

  .k-kanban--4 {
    grid-template-columns: repeat(4, 220px);
  }
}

.k-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--k-text-2);
  cursor: pointer;
}

.k-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--k-purple);
}

.k-auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 16px;
}

.k-notify-btn {
  position: relative;
}

.k-notify-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 12px;
  height: 12px;
  padding: 0 3px;
  border-radius: 99px;
  background: var(--k-red);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 0 0 1.5px #fff;
}

.k-notify {
  position: relative;
}

.k-notify__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 340px;
  max-width: min(340px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid var(--k-border);
  border-radius: 12px;
  box-shadow: var(--k-shadow-lg);
  padding: 0;
  z-index: 80;
  overflow: hidden;
}

.k-notify__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--k-border);
}

.k-notify__head strong {
  font-size: 13px;
  font-weight: 700;
}

.k-notify__head span {
  font-size: 11px;
  color: var(--k-text-2);
}

.k-notify__list {
  max-height: 320px;
  overflow: auto;
}

.k-notify__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--k-border);
}

.k-notify__item:last-child {
  border-bottom: 0;
}

.k-notify__item:hover {
  background: rgba(255, 77, 0, 0.06);
}

.k-notify__item.is-unread {
  background: rgba(255, 77, 0, 0.04);
}

.k-notify__item.is-unread strong {
  color: var(--k-text);
}

.k-notify__item strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.k-notify__item span {
  font-size: 12px;
  color: var(--k-text-2);
  line-height: 1.4;
}

.k-notify__item time {
  font-size: 11px;
  color: var(--k-muted, #8a8f98);
  margin-top: 2px;
}

.k-notify__empty {
  margin: 0;
  padding: 20px 14px;
  font-size: 13px;
  color: var(--k-text-2);
  text-align: center;
}

.k-notify__all {
  display: block;
  padding: 10px 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--k-orange, #ff4d00);
  text-decoration: none;
  border-top: 1px solid var(--k-border);
}

.k-notify__all:hover {
  background: rgba(255, 77, 0, 0.06);
}

.k-profile {
  position: relative;
}

.k-profile__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--k-text);
  padding: 4px 6px;
  border-radius: 8px;
}

.k-profile__btn:hover {
  background: rgba(255, 77, 0, 0.08);
}

.k-profile__name {
  font-size: 13px;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.k-profile__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: #fff;
  border: 1px solid var(--k-border);
  border-radius: 12px;
  box-shadow: var(--k-shadow-lg);
  padding: 8px;
  z-index: 80;
}

.k-profile__meta {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--k-border);
  margin-bottom: 6px;
}

.k-profile__meta strong {
  display: block;
  font-size: 13px;
}

.k-profile__meta span {
  font-size: 11px;
  color: var(--k-muted);
}

.k-profile__menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--k-text);
  text-decoration: none;
  font-size: 13px;
}

.k-profile__menu a:hover {
  background: var(--k-purple-soft);
  color: var(--k-purple);
}

.k-profile__logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--k-red);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.k-profile__logout:hover {
  background: rgba(220, 38, 38, 0.08);
  color: var(--k-red);
}

@media (max-width: 900px) {
  .k-profile__name {
    display: none;
  }
}

.k-modal__panel--chat {
  width: min(780px, 100%);
  height: min(88vh, 820px);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  padding: 0;
}

.k-modal__panel--chat .k-modal__head {
  flex: 0 0 auto;
  padding-bottom: 16px;
  border-bottom: 0;
}

.k-modal--stack {
  z-index: 10020;
}

.k-icon-btn--chat {
  position: relative;
  overflow: visible;
}

.k-chat-count {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 12px;
  height: 12px;
  padding: 0 3px;
  border-radius: 99px;
  background: var(--k-red);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
}

.k-table .k-chat-count {
  top: -4px;
  right: -5px;
  min-width: 11px;
  height: 11px;
  padding: 0 3px;
  font-size: 8px;
  line-height: 11px;
}

.k-chat__msg--theirs {
  align-self: flex-start;
}

.k-chat__msg--mine {
  align-self: flex-end;
  flex-direction: row-reverse;
  margin-left: auto;
}

.k-chat__bubble--mine {
  background: #ffe8dc;
  color: var(--k-text);
  border-color: #ffd2c2;
  border-radius: 14px 4px 14px 14px;
}

.k-chat__bubble--mine .k-chat__who,
.k-chat__bubble--mine .k-chat__text,
.k-chat__bubble--mine .k-chat__event,
.k-chat__bubble--mine .k-chat__event p,
.k-chat__bubble--mine .k-chat__event strong {
  color: var(--k-text);
}

.k-chat__bubble--mine .k-chat__when {
  color: var(--k-muted);
}

.k-chat__event {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(20, 16, 40, 0.08);
  font-size: 13px;
  line-height: 1.45;
}

.k-chat__bubble--mine .k-chat__event {
  border-top-color: rgba(20, 16, 40, 0.1);
}

.k-chat__event p {
  margin: 4px 0 0;
}

.k-chat__event-title {
  display: block;
  margin-bottom: 6px;
}

.k-chat__link {
  color: var(--k-purple);
  word-break: break-all;
}

.k-chat__head-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--k-muted);
  font-weight: 500;
}

.k-chat__dock {
  flex: 0 0 auto;
  border-top: 0;
  background: #fff;
}

.k-chat__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 14px;
}

.k-crumbs a {
  color: var(--k-muted);
  text-decoration: none;
  font-size: 13px;
}

.k-crumbs a:hover {
  color: var(--k-purple);
}

.k-lead-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.k-lead-hero__id {
  margin: 4px 0 10px;
  font-size: 13px;
  color: var(--k-muted);
}

.k-lead-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  color: var(--k-text-2);
}

.k-lead-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.k-lead-meta i {
  color: var(--k-purple);
}

.k-lead-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 560px;
}

.k-lead-kpis {
  margin-bottom: 16px;
}

.k-lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.k-lead-side {
  position: sticky;
  top: 76px;
}

.k-dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.k-dl > div {
  display: grid;
  gap: 2px;
}

.k-dl dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--k-muted);
}

.k-dl dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.k-co-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.k-co-block {
  padding: 16px;
  border-radius: var(--k-radius);
  border: 1px solid var(--k-border);
  min-height: 0;
}

.k-co-block__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.k-co-block__head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--k-text);
  flex: 1;
}

.k-co-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.k-co-tile {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(16, 24, 40, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}

.k-co-tile.is-wide {
  grid-column: 1 / -1;
}

.k-co-tile__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--k-muted);
  margin-bottom: 4px;
}

.k-co-tile__value {
  display: block;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--k-text);
  word-break: break-word;
}

@media (max-width: 900px) {
  .k-co-blocks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .k-co-tiles {
    grid-template-columns: 1fr;
  }
}

[data-tab-panel="lead"][data-tab-id="overview"] .k-card,
[data-tab-panel="lead"][data-tab-id="activity"] .k-card,
[data-tab-panel="lead"][data-tab-id="history"] .k-card {
  font-size: 13px;
  font-weight: 400;
  color: var(--k-text);
}

[data-tab-panel="lead"][data-tab-id="overview"] .k-card__title,
[data-tab-panel="lead"][data-tab-id="activity"] .k-card__title,
[data-tab-panel="lead"][data-tab-id="history"] .k-card__title {
  font-size: 13px;
}

.k-more {
  position: relative;
}

.k-more__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 200px;
  background: #fff;
  border: 1px solid var(--k-border);
  border-radius: 12px;
  box-shadow: var(--k-shadow-lg);
  padding: 6px;
  z-index: 80;
}

.k-more__menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.k-more__menu button:hover {
  background: var(--k-purple-soft);
  color: var(--k-purple);
}

.k-more__menu button.is-danger {
  color: var(--k-red);
}

.k-act-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eee;
  color: #555;
  margin-right: 6px;
}

.k-act-label--note { background: #FFE8DC; color: #C43A00; }
.k-act-label--follow-up { background: #ffedd5; color: #c2410c; }
.k-act-label--meeting { background: #dbeafe; color: #1d4ed8; }
.k-act-label--call { background: #dcfce7; color: #15803d; }
.k-act-label--email { background: #e0f2fe; color: #0369a1; }
.k-act-label--status-update { background: #fce7f3; color: #be185d; }
.k-act-label--system { background: #f3f4f6; color: #4b5563; }

.k-timeline--rich li strong {
  display: inline;
}

.k-timeline--rich .k-timeline__when {
  display: block;
  font-size: 12px;
  color: var(--k-muted);
  margin-bottom: 2px;
}

.k-timeline--rich .k-timeline__body,
.k-timeline .k-muted {
  margin-top: 4px;
  color: var(--k-text-2);
  font-size: inherit;
  line-height: 1.45;
}

.k-chat {
  flex: 1;
  overflow: auto;
  background: #f3f1ed;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.k-chat__msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 92%;
}

.k-chat__bubble {
  background: #fff;
  border: 1px solid var(--k-border);
  border-radius: 4px 14px 14px 14px;
  padding: 10px 14px;
  box-shadow: 0 1px 2px rgba(20, 16, 40, 0.04);
}

.k-chat__who {
  font-size: 13px;
  font-weight: 650;
}

.k-chat__when {
  font-size: 11px;
  color: var(--k-muted);
  margin-left: 8px;
  font-weight: 500;
}

.k-chat__text {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--k-text);
}

.k-chat__composer {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 0 16px 16px;
  border-top: 0;
  background: #fff;
}

.k-chat__dock .k-chat__composer {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.k-chat__field {
  position: relative;
  width: 100%;
}

.k-chat__composer .k-textarea {
  flex: 1;
  margin: 0;
  min-height: 72px;
}

.k-chat__dock .k-chat__composer .k-textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 52px 14px 14px;
  resize: none;
  box-sizing: border-box;
}

.k-chat__send {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--k-purple);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.k-chat__send i {
  font-size: 16px;
  line-height: 1;
}

.k-chat__send:hover {
  filter: brightness(1.08);
}

.k-chat__send:disabled {
  opacity: 0.7;
  cursor: wait;
  filter: none;
}

.k-chat__composer.is-sending .k-textarea {
  opacity: 0.72;
}

.k-chat__msg.is-pending {
  opacity: 0.72;
}

.k-spin {
  animation: k-spin 0.7s linear infinite;
}

@keyframes k-spin {
  to {
    transform: rotate(360deg);
  }
}

.k-card--chat {
  display: flex;
  flex-direction: column;
  min-height: min(62vh, 640px);
}

.k-card--chat .k-card__head {
  flex: 0 0 auto;
  margin: 0;
  padding: 16px 18px 12px;
}

.k-card--chat .k-chat {
  flex: 1;
}

.k-card--chat .k-chat__dock {
  border-top: 1px solid var(--k-border);
}

.k-chat--panel {
  min-height: 360px;
  max-height: min(58vh, 560px);
}

[data-tab-panel="lead"][data-tab-id="notes"] .k-card--chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

[data-tab-panel="lead"][data-tab-id="notes"] .k-chat--panel {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.k-chat__msg--theirs .k-avatar {
  background: #e8dfd4;
}

.k-chat__msg--mine .k-avatar {
  background: var(--k-purple);
  color: #fff;
}

.k-chat__bubble .k-pill {
  margin-top: 8px;
  margin-right: 4px;
}

.k-notes-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.k-note-card {
  border: 1px solid var(--k-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}

.k-note-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--k-muted);
}

.k-fu-bucket {
  margin-bottom: 16px;
}

.k-fu-bucket:last-child {
  margin-bottom: 0;
}

.k-fu-bucket__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.k-fu-bucket__head strong {
  font-size: 11px;
  letter-spacing: 0.08em;
}

.k-fu-card {
  border: 1px solid var(--k-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.k-fu-card h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.k-fu-card p {
  margin: 0;
  font-size: 13px;
  color: var(--k-text-2);
}

.k-fu-bucket--overdue .k-fu-card {
  border-color: #fecaca;
  background: #fff7f7;
}

.k-fu-bucket--today .k-fu-card {
  border-color: #fde68a;
  background: #fffbeb;
}

.k-meet-card {
  border: 1px solid var(--k-border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fff;
}

.k-meet-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.k-meet-card .meta {
  font-size: 13px;
  color: var(--k-text-2);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.k-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.k-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--k-purple-soft);
  font-size: 12px;
  font-weight: 600;
}

.k-chip--ext {
  background: #e0f2fe;
  color: #0369a1;
}

.k-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 10px;
  padding: 8px;
  border: 1px solid var(--k-border);
  border-radius: 10px;
  background: #fafafa;
  max-height: 220px;
  overflow: auto;
}

.k-people__item,
.k-people label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--k-text);
  cursor: pointer;
}

.k-people__item:hover,
.k-people label:hover {
  background: #fff;
}

.k-people input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  border: 1.5px solid var(--k-border-strong);
  border-radius: 4px;
  background: #fff;
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  position: relative;
  top: 0;
  cursor: pointer;
}

.k-people input[type="checkbox"]::after {
  content: "";
  width: 8px;
  height: 5px;
  border: 2px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translateY(-0.5px);
  opacity: 0;
}

.k-people input[type="checkbox"]:checked {
  background: var(--k-purple);
  border-color: var(--k-purple);
}

.k-people input[type="checkbox"]:checked::after {
  opacity: 1;
}

.k-people__item span,
.k-people label span {
  min-width: 0;
  line-height: 1.25;
}

.k-docs__upload {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px dashed var(--k-border-strong);
  border-radius: var(--k-radius);
  background: var(--k-purple-soft);
  margin-bottom: 18px;
}

.k-docs__pick {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--k-border);
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  cursor: pointer;
  overflow: hidden;
}

.k-docs__pick:focus-within {
  border-color: #ffc4a8;
  box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.12);
}

.k-docs__pick input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.k-docs__fname {
  font-size: 13px;
  color: var(--k-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.k-docs__toolbar {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: nowrap;
  margin-bottom: 12px;
}

.k-docs__toolbar .k-docs__field,
.k-docs__upload .k-docs__field,
.k-modal .k-docs__toolbar .k-field {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.k-docs__toolbar > .k-btn,
.k-docs__upload > .k-btn {
  flex: 0 0 auto;
}

.k-modal .k-docs__pick,
.k-modal .k-docs__toolbar > .k-btn {
  height: 40px;
}

.k-docs__lead {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--k-muted);
}

.k-docs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.k-docs-tabs .k-btn.active {
  background: var(--k-purple-soft);
  color: var(--k-purple);
  border-color: #ffc4a8;
}

.k-docs-tabs [data-quotes-count],
.k-docs-tabs [data-support-count] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 99px;
  background: #ebe9e4;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
}

.k-docs-tabs .k-btn.active [data-quotes-count],
.k-docs-tabs .k-btn.active [data-support-count] {
  background: var(--k-purple);
  color: #fff;
}

.k-docs__file {
  display: flex;
  gap: 10px;
  align-items: center;
}

.k-docs__file i {
  color: var(--k-purple);
  font-size: 18px;
}

.k-docs__block {
  margin-bottom: 18px;
}

.k-docs__block:last-child {
  margin-bottom: 0;
}

.k-masters {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 14px;
  align-items: start;
}

.k-masters__cats {
  padding: 0 0 8px;
}

.k-masters__cats .k-card__head {
  padding: 14px 16px;
  margin: 0;
  border-bottom: 1px solid var(--k-border);
}

.k-masters__cat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 16px);
  margin: 4px 8px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--k-text-2);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.k-masters__cat i {
  font-size: 16px;
  color: var(--k-purple);
}

.k-masters__cat:hover,
.k-masters__cat.is-active {
  background: var(--k-purple-soft);
  color: var(--k-text);
}

@media (max-width: 900px) {
  .k-masters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .k-lead-layout {
    grid-template-columns: 1fr;
  }
  .k-lead-side {
    position: static;
  }
  .k-lead-hero {
    flex-direction: column;
  }
  .k-lead-actions {
    max-width: none;
    justify-content: flex-start;
  }
  .k-grid-6.k-lead-kpis {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .k-grid-6.k-lead-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}

.k-topbar {
  overflow: visible;
}

.k-topbar > .k-search {
  z-index: 50;
}

.k-search-drop {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max(100%, 400px);
  max-width: min(480px, calc(100vw - 24px));
  max-height: min(420px, calc(100vh - 80px));
  overflow: auto;
  background: #fff;
  border: 1px solid var(--k-border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.12);
  padding: 6px 0;
  z-index: 80;
}

.k-search-drop.is-open {
  display: block;
}

.k-search-drop[hidden] {
  display: none !important;
}

.k-search-drop__label {
  margin: 0;
  padding: 8px 14px 4px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--k-muted);
}

.k-search-drop a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 14px;
  text-decoration: none;
  color: inherit;
}

.k-search-drop a:hover,
.k-search-drop a.is-active {
  background: #fafaf8;
}

.k-search-drop a i {
  position: static;
  transform: none;
  margin-top: 2px;
  font-size: 16px;
  color: var(--k-purple);
}

.k-search-drop strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--k-text);
}

.k-search-drop .sub {
  font-size: 12px;
  color: var(--k-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.k-search-drop__empty {
  margin: 0;
  padding: 16px 14px;
  font-size: 13px;
  color: var(--k-muted);
}

.k-table tfoot th,
.k-table tfoot td {
  padding: 0 14px;
  height: 44px;
  background: #f6f5f2;
  border-top: 1px solid var(--k-border);
  border-bottom: 0;
  font-weight: 600;
  color: var(--k-text);
  font-variant-numeric: tabular-nums;
}

.k-table tfoot tr:hover th,
.k-table tfoot tr:hover td {
  background: #f6f5f2;
}

/* Mobile / tablet — unlock drawer + stack dense chrome */
@media (max-width: 1024px) {
  .k-sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    width: min(280px, 86vw) !important;
    min-width: 0 !important;
    max-width: min(280px, 86vw) !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    z-index: 50;
  }

  .k-topbar {
    padding: 0 12px !important;
    gap: 8px;
  }

  .k-topbar__left {
    gap: 8px;
    min-width: 0;
  }

  .k-topbar__left .k-crumbs span:first-child {
    display: none;
  }

  .k-topbar > .k-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .k-topbar > .k-search .k-kbd {
    display: none;
  }

  .k-date-range {
    width: 100%;
  }

  .k-date-range .k-input[type="date"] {
    width: 100%;
    min-width: 0;
  }

  .k-card__head {
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }

  #form-stage-pipeline {
    width: 100%;
  }

  #form-stage-pipeline .k-select {
    max-width: none !important;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .k-welcome {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .k-welcome .k-btn {
    width: 100%;
    justify-content: center;
  }

  .k-topbar__left .k-env {
    display: none;
  }

  .k-topbar__left .k-crumbs {
    display: none;
  }

  .k-profile__name {
    display: none;
  }

  .k-modal {
    padding: 0;
    align-items: flex-end;
  }

  .k-modal__panel,
  .k-modal__panel--lg,
  .k-modal__panel--sm {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }

  .k-kanban {
    grid-template-columns: repeat(6, minmax(200px, 220px));
  }
}

@media (max-width: 480px) {
  .k-topbar > .k-search {
    display: none;
  }

  .k-grid-2 {
    grid-template-columns: 1fr;
  }
}
