/**
 * Hotkup Client module — aligned with marketing brand (hotkup.com)
 * Primary: #2579FF · Neutrals · Inter/Poppins stack from index.html
 */
:root {
  --hk-brand-primary: #2579ff;
  --hk-brand-primary-hover: #1a66e0;
  --hk-brand-primary-light: #e8f1ff;
  --hk-text-primary: #283042;
  --hk-text-secondary: #8394b1;
  --hk-text-muted: #9aa8bc;
  --hk-border: #e4e9f2;
  --hk-border-strong: #c6cedd;
  --hk-surface: #ffffff;
  --hk-surface-muted: #f6f8fb;
  --hk-radius-sm: 4px;
  --hk-radius-md: 8px;
  --hk-radius-lg: 12px;
  --hk-shadow-card: 0 1px 4px rgba(40, 48, 66, 0.08);
  --hk-shadow-header: 0 1px 0 var(--hk-border);
  --hk-font: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --hk-tab-active: var(--hk-brand-primary);
  --hk-client-header-toolbar-height: 64px;
  --hk-client-header-due-height: 36px;
}

/* ---- Client view shell ---- */
.hk-module {
  overflow-x: hidden;
  overflow-y: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.hk-module .client_view_container {
  font-family: var(--hk-font);
  overflow-x: hidden;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.hk-module .client_view_container {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

.taskDetailContainer {
  flex: 1 1 0%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ---- Client page header ---- */
.hk-module .task_view_header {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: var(--hk-client-header-toolbar-height);
  height: auto;
  background: var(--hk-surface);
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md) var(--hk-radius-md) 0 0;
  box-shadow: var(--hk-shadow-card);
  margin: 12px 12px 0;
  overflow: hidden;
  max-width: calc(100% - 24px);
  box-sizing: border-box;
}

.hk-module .client-page-header {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: var(--hk-client-header-toolbar-height);
  height: var(--hk-client-header-toolbar-height);
  padding: 0 !important;
  width: 100%;
  box-sizing: border-box;
}

.hk-module .client-page-header:has(.client-page-header__due) {
  min-height: calc(var(--hk-client-header-toolbar-height) + var(--hk-client-header-due-height));
  height: calc(var(--hk-client-header-toolbar-height) + var(--hk-client-header-due-height));
}

.hk-module .client-page-header__due {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-height: var(--hk-client-header-due-height);
  height: var(--hk-client-header-due-height);
  padding: 0 20px;
  box-sizing: border-box;
}

.hk-module .client-due-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--hk-text-secondary);
  background: var(--hk-surface-muted);
  border: 1px solid var(--hk-border);
}

.hk-module .client-due-chip--critical {
  color: #fff;
  background: #e91e63;
  border-color: #e91e63;
}

.hk-module .client-due-chip--high {
  color: #fff;
  background: #f57c00;
  border-color: #f57c00;
}

.hk-module .client-due-chip--medium {
  color: #fff;
  background: #0288d1;
  border-color: #0288d1;
}

.hk-module .client-due-chip--low {
  color: #fff;
  background: #43a047;
  border-color: #43a047;
}

.hk-module .client-page-header__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
  min-height: var(--hk-client-header-toolbar-height);
  height: var(--hk-client-header-toolbar-height);
  padding: 0 20px;
  border-bottom: 1px solid var(--hk-border);
  box-sizing: border-box;
}

.hk-module .client-page-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hk-module .client-page-header__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  min-width: 0;
}

.hk-module .client-page-header__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--hk-text-primary);
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
  max-width: 100%;
}

.hk-module .client-page-header__meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  flex: 0 0 auto;
}

.hk-module .client-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: #ff6fa0;
  border-radius: 20px;
}

.hk-module .client-page-header__meta .info-label-wrapper {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border: 1px solid rgba(37, 121, 255, 0.25);
  min-width: auto;
  max-width: none;
}

.hk-module .client-page-header__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hk-module .client-btn-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 16px;
  font-family: var(--hk-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--hk-brand-primary);
  background: var(--hk-surface);
  border: 1px solid var(--hk-brand-primary);
  border-radius: var(--hk-radius-md);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.hk-module .client-btn-edit:hover {
  color: #fff;
  background: var(--hk-brand-primary);
  box-shadow: 0 2px 8px rgba(37, 121, 255, 0.25);
}

.hk-module .client-btn-edit--muted {
  color: var(--hk-text-secondary);
  border-color: var(--hk-border-strong);
}

.hk-module .client-btn-edit--muted:hover {
  color: var(--hk-text-primary);
  background: var(--hk-surface-muted);
  box-shadow: none;
}

.hk-module .client-page-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
  overflow-x: hidden;
  max-width: calc(100% - 24px);
  width: calc(100% - 24px);
  max-width: calc(100% - 24px);
  width: calc(100% - 24px);
  box-sizing: border-box;
  margin: 0 12px 12px;
  padding: 0 !important;
  border: 1px solid var(--hk-border);
  border-top: none;
  border-radius: 0 0 var(--hk-radius-md) var(--hk-radius-md);
  background: var(--hk-surface);
  box-sizing: border-box;
}

.hk-module .task_view_header,
.hk-module .client-page-body {
  margin-left: 0 !important;  
  margin-right: 0 !important; 
  max-width: 100% !important; 
  width: 100% !important;     
  border-radius: 0 !important;
}

/* ---- Tab bar (horizontal; icon + label on large, icon-only on narrow) ---- */
.hk-module .task-view-tabs {
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--hk-surface-muted);
  border-top: 1px solid var(--hk-border);
  border-bottom: 1px solid var(--hk-border);
  container-type: inline-size;
  container-name: client-tabs-bar;
}

.hk-module .client-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 4px 8px 0;
  list-style: none;
  overflow-x: hidden;
  overflow-y: hidden;
  min-height: 48px;
  height: auto !important;
  max-width: 100%;
  box-sizing: border-box;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.hk-module .client-tab {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hk-module .client-tab__btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 12px;
  margin: 0;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--hk-text-secondary);
  font-family: var(--hk-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none !important;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  vertical-align: middle;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.hk-module .client-tab__btn:hover {
  color: var(--hk-text-primary);
  background: rgba(255, 255, 255, 0.6);
}

.hk-module .client-tab.is-active .client-tab__btn {
  color: var(--hk-tab-active);
  font-weight: 600;
  background: var(--hk-surface);
  border-bottom-color: var(--hk-tab-active);
}

.hk-module .client-tab__icon {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  position: relative;
  color: inherit;
  line-height: 0;
}

.hk-module .client-tab__icon > span[uk-icon],
.hk-module .client-tab__icon > .uk-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hk-module .client-tab__icon svg {
  width: 18px !important;
  height: 18px !important;
  display: block;
}

.hk-module .client-tab__label {
  display: none;
  line-height: 1.2;
  text-transform: none !important;
  vertical-align: middle;
}

/* Active tab shows its label */
.hk-module .client-tab.is-active .client-tab__label {
  display: inline-block !important;
}

.hk-module .client-tab__count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: var(--hk-brand-primary);
  border-radius: 10px;
  flex-shrink: 0;
}

/* Narrow client panel / small window: icon-only tabs */
@container client-tabs-bar (max-width: 961px) {
  .hk-module .client-tab__label {
    display: none !important;
  }

  .hk-module .client-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 6px 0;
    scrollbar-width: thin;
  }

  .hk-module .client-tab__btn {
    gap: 6;
    width: auto;
    min-width: 0;
    padding: 0 12px;
    /* justify-content: center; */
  }

  /* Active tab expands to show label */
  .hk-module .client-tab.is-active .client-tab__btn {
    gap: 6px;
    min-width: 0;
    width: auto;
    padding: 0 12px;
  }

  .hk-module .client-tab.is-active .client-tab__label {
    display: inline-block !important;
  }

  .hk-module .client-tab__count-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
  }

  .hk-module .client-tab__btn:has(.client-tab__count-badge) {
    position: relative;
    width: auto;
    min-width: 44px;
    padding-right: 10px;
  }
}

/* Large client panel: icon + text */
@container client-tabs-bar (min-width: 961px) {
  .hk-module .client-tab__label {
    display: none;
  }

  .hk-module .client-tabs {
    flex-wrap: wrap;
    overflow-x: hidden;
  }

  .hk-module .client-tab__btn {
    gap: 6px;
    width: auto;
    min-width: 0;
    padding: 0 12px;
  }

  .hk-module .client-tab__count-badge {
    position: static;
  }
}

.hk-module .client-tab__badge {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e53935;
  border: 1.5px solid var(--hk-surface-muted);
}

.hk-module .client-tab-panels {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  overflow-x: hidden;
  max-width: 100%;
  background: var(--hk-surface);
}

.hk-module .client-tab-panel {
  flex-grow: 1;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
}

.client-files-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 24px;
  margin: 0;
  text-align: center;
  color: var(--hk-text-secondary);
  background: var(--hk-surface-muted);
  border: 1px dashed var(--hk-border);
  border-radius: var(--hk-radius-md);
}

.client-files-empty p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--hk-text-primary);
}

.client-files-empty__hint {
  font-size: 13px;
  color: var(--hk-text-muted);
}

.client-files-empty .uk-icon {
  color: var(--hk-text-muted);
}

/* Override legacy .tab-bar / theme tab rules inside client module */
.hk-module .tab-bar.client-tabs,
.hk-module .client-tabs,
.app-container[data-theme="flutter"] .hk-module .client-tabs,
.app-container[data-theme="mild"] .hk-module .client-tabs {
  height: auto !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.app-container[data-theme="flutter"] .hk-module .task_view_header,
.app-container[data-theme="mild"] .hk-module .task_view_header {
  background: var(--hk-surface) !important;
  margin: 0 !important;
  border-radius: 0 !important;
  min-height: var(--hk-client-header-toolbar-height) !important;
  height: auto !important;
}

.app-container[data-theme="flutter"] .hk-module .client-page-header,
.app-container[data-theme="mild"] .hk-module .client-page-header {
  min-height: var(--hk-client-header-toolbar-height) !important;
  height: var(--hk-client-header-toolbar-height) !important;
}

.app-container[data-theme="flutter"] .hk-module .client-page-header:has(.client-page-header__due),
.app-container[data-theme="mild"] .hk-module .client-page-header:has(.client-page-header__due) {
  min-height: calc(var(--hk-client-header-toolbar-height) + var(--hk-client-header-due-height)) !important;
  height: calc(var(--hk-client-header-toolbar-height) + var(--hk-client-header-due-height)) !important;
}

.hk-module .client-tabs .uk-subnav-pill > * > a,
.hk-module .uk-subnav-pill > .uk-active > a {
  border-bottom: none !important;
  background: transparent !important;
}

/* ---- Tasks tab ---- */
.client-tasks-tab {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  font-family: var(--hk-font);
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.client-tasks-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.client-tasks-toolbar .client-search-group {
  flex: 1;
  max-width: 400px;
}

.client-tasks-toolbar .client-search-group input.uk-input {
  height: 40px !important;
  width: 100% !important;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  background: var(--hk-surface);
  font-size: 14px;
  padding-left: 40px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.client-tasks-toolbar .client-search-group input.uk-input:focus {
  border-color: var(--hk-brand-primary);
  box-shadow: 0 0 0 3px var(--hk-brand-primary-light);
  outline: none;
}

.client-tasks-toolbar .client-search-group .uk-form-icon {
  color: var(--hk-text-secondary);
  margin-left: 12px;
}

.client-tasks-toolbar .client-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hk-text-muted);
  cursor: pointer;
}

.client-tasks-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hk-border);
}

.client-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--hk-text-primary);
  letter-spacing: -0.01em;
}

.client-section-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-sm);
  background: var(--hk-surface);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.client-btn-icon:hover {
  background: var(--hk-surface-muted);
  border-color: var(--hk-border-strong);
}

.client-btn-icon img {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.client-tasks-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hk-module .hotkup-toggle-btn {
  font-size: 0.75rem;
  color: var(--hk-text-secondary);
  letter-spacing: 0.04em;
}

.client-new-task-group {
  display: flex;
  position: relative;
}

.client-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: #fff !important;
  background: var(--hk-brand-primary) !important;
  border: none;
  border-radius: var(--hk-radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
  text-transform: none !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
}

.client-btn-primary:hover {
  background: var(--hk-brand-primary-hover) !important;
}

.client-btn-primary--split-left {
  border-radius: var(--hk-radius-md) 0 0 var(--hk-radius-md);
}

.client-btn-primary--split-right {
  border-radius: 0 var(--hk-radius-md) var(--hk-radius-md) 0;
  min-width: 36px;
  padding: 0 10px;
  margin-left: 1px;
}

/* Tasks tab: card / list view toggle */
.client-tasks-view-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  overflow: hidden;
  background: var(--hk-surface-muted);
}

.client-tasks-view-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--hk-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.client-tasks-view-toggle__btn + .client-tasks-view-toggle__btn {
  border-left: 1px solid var(--hk-border);
}

.client-tasks-view-toggle__btn:hover {
  color: var(--hk-text-primary);
  background: rgba(255, 255, 255, 0.7);
}

.client-tasks-view-toggle__btn.is-active {
  color: var(--hk-brand-primary);
  background: var(--hk-surface);
  font-weight: 600;
}

.client-task-card-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
  padding: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
}

.client-tasks-tab .task-module-container-for-list.client-task-card-wrapper {
  display: grid;
  flex-direction: unset;
  justify-content: unset;
}

.client-task-list-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  background: var(--hk-surface);
}

.client-task-list-header,
.client-task-list-row {
  display: grid;
  grid-template-columns: 52px minmax(120px, 2fr) minmax(80px, 1fr) 88px 100px 80px minmax(72px, 1fr);
  align-items: center;
  gap: 8px 12px;
  padding: 0 16px;
  box-sizing: border-box;
}

.client-task-list-header {
  flex-shrink: 0;
  min-height: 40px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hk-text-muted);
  background: var(--hk-surface-muted);
  border-bottom: 1px solid var(--hk-border);
}

.client-task-list-header__title {
  text-align: left;
}

.client-task-list-row {
  min-height: 52px;
  font-size: 13px;
  color: var(--hk-text-primary);
  border-bottom: 1px solid var(--hk-border);
  border-left: 3px solid var(--hk-brand-primary);
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
  position: relative;
  outline: none;
}

.client-task-list-row:last-child {
  border-bottom: none;
}

.client-task-list-row:hover {
  background: var(--hk-surface-muted);
  /* box-shadow: inset 0 0 0 1px rgba(37, 121, 255, 0.25), inset 3px 0 0 0 rgba(37, 121, 255, 0.6); */
}

.client-task-list-row:focus-visible,
.client-task-list-row:focus {
  outline: 2px solid var(--hk-brand-primary);
  outline-offset: -2px;
  z-index: 1;
}

.client-task-list-row--critical {
  border-left: 3px solid #e91e63;
}

.client-task-list-row--high {
  border-left: 3px solid #ff9800;
}

.client-task-list-row--critical:hover {
  box-shadow: inset 0 0 0 1px rgba(233, 30, 99, 0.25), inset 3px 0 0 0 #e91e63;
}

.client-task-list-row--high:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 152, 0, 0.25), inset 3px 0 0 0 #ff9800;
}

.client-task-list-row__cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-task-list-row__sno {
  font-weight: 600;
  color: var(--hk-text-secondary);
  font-variant-numeric: tabular-nums;
}

.client-task-list-row__title {
  font-weight: 500;
  white-space: nowrap;
}

.client-task-list-row__assignees {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: visible;
  white-space: nowrap;
}

.client-task-list-row__tag {
  display: inline-block;
  max-width: 100%;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border-radius: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-task-list-row__status-pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
  border-radius: 10px;
}

.client-task-list-row__status-pill--info {
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
}

.client-task-list-row__status-pill--warning {
  color: #e65100;
  background: #fff3e0;
}

.client-task-list-row__status-pill--success {
  color: #2e7d32;
  background: #e8f5e9;
}

.client-task-list-row__status-pill--normal {
  color: var(--hk-text-secondary);
  background: var(--hk-surface-muted);
}

.client-task-list-row__priority--critical {
  color: #e91e63;
  font-weight: 600;
}

.client-task-list-row__priority--high {
  color: #f57c00;
  font-weight: 600;
}

.client-task-list-row__priority--medium {
  color: #0288d1;
}

.client-task-list-row__priority--low {
  color: #43a047;
}

.client-task-list-row__muted {
  color: var(--hk-text-muted);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .client-task-list-header,
  .client-task-list-row {
    grid-template-columns: 48px minmax(100px, 2fr) 72px 80px 1fr;
  }

  .client-task-list-header__cell:nth-child(3),
  .client-task-list-header__cell:nth-child(6),
  .client-task-list-row__category,
  .client-task-list-row__priority {
    display: none;
  }
}

.client-task-card-slot {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  outline: none;
}

.client-task-card-slot:hover {
  border-radius: var(--hk-radius-md);
  /* box-shadow: 0 0 0 1px rgba(37, 121, 255, 0.35), 0 2px 8px rgba(37, 121, 255, 0.12); */
}

.client-task-card-slot:focus-visible,
.client-task-card-slot:focus {
  border-radius: var(--hk-radius-md);
  outline: 2px solid var(--hk-brand-primary);
  outline-offset: 2px;
}

.client-task-card-slot--critical:hover {
  box-shadow: 0 0 0 1px rgba(233, 30, 99, 0.35), 0 2px 8px rgba(233, 30, 99, 0.12);
}

.client-task-card-slot--high:hover {
  box-shadow: 0 0 0 1px rgba(255, 152, 0, 0.35), 0 2px 8px rgba(255, 152, 0, 0.12);
}

.client-task-card-slot .client-task-card {
  display: flex;
  flex-direction: column;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  flex: 1;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .client-task-card-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
}

.client-task-card-slot--critical::before,
.client-task-card-slot--high::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 0;
  height: 0;
  border-style: solid;
  pointer-events: none;
}

.client-task-card-slot--critical::before {
  border-width: 12px 12px 0 0;
  border-color: #e91e63 transparent transparent transparent;
}

.client-task-card-slot--high::before {
  border-width: 12px 12px 0 0;
  border-color: #ff9800 transparent transparent transparent;
}

.client-tasks-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  margin: 0;
  text-align: center;
  padding: 24px;
  color: var(--hk-text-secondary);
  font-size: 14px;
  background: var(--hk-surface-muted);
  border-radius: var(--hk-radius-md);
  border: 1px dashed var(--hk-border);
}

.client-load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 24px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.client-load-more-btn:hover {
  background: #dceaff;
  border-color: var(--hk-brand-primary);
}

/* ------------------------------------------------------------------ */
/* Task card (used by client-task-card-view + contact-task-card-view) */
/* ------------------------------------------------------------------ */
.client-task-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 152px;
  box-sizing: border-box;
  padding: 16px 18px 14px;
  background: var(--hk-surface, #fff);
  border: 1px solid var(--hk-border, #e4e9f2);
  border-radius: var(--hk-radius-md, 8px);
  box-shadow: var(--hk-shadow-card, 0 1px 3px rgba(40, 48, 66, 0.06));
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.client-task-card:hover {
  border-color: var(--hk-brand-primary, #2579ff);
  box-shadow: 0 6px 18px rgba(37, 121, 255, 0.12);
  transform: translateY(-1px);
}

.client-task-card__priority-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}

.client-task-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.client-task-card__sno {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--hk-text-secondary, #8394b1);
}

.client-task-card__date {
  font-size: 11px;
  color: var(--hk-text-secondary, #8394b1);
  white-space: nowrap;
}

.client-task-card__title {
  margin: 0 0 10px 0;
  padding: 0;
  font-family: var(--hk-font, inherit);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  color: var(--hk-brand-primary, #2579ff);
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.client-task-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.client-task-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  height: 22px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

.client-task-card__pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.client-task-card__pill--category {
  max-width: 180px;
  color: #5468a6;
  background: rgba(99, 132, 226, 0.10);
  border: 1px solid rgba(99, 132, 226, 0.22);
}

.client-task-card__pill--category .uk-icon {
  color: #6b7fbf;
  flex-shrink: 0;
}

.client-task-card__pill--status {
  text-transform: uppercase;
}

.client-task-card__pill--status-info {
  color: #1d6fe0;
  background: rgba(37, 121, 255, 0.10);
  border: 1px solid rgba(37, 121, 255, 0.22);
}

.client-task-card__pill--status-warning {
  color: #b96a00;
  background: rgba(255, 153, 0, 0.10);
  border: 1px solid rgba(255, 153, 0, 0.25);
}

.client-task-card__pill--status-progress {
  color: #5f4dbf;
  background: rgba(124, 92, 255, 0.10);
  border: 1px solid rgba(124, 92, 255, 0.22);
}

.client-task-card__pill--status-success {
  color: #1f9d4f;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.client-task-card__pill--status-normal {
  color: #5e6b85;
  background: rgba(94, 107, 133, 0.08);
  border: 1px solid rgba(94, 107, 133, 0.20);
}

.client-task-card__description {
  margin: 0 0 12px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--hk-text-secondary, #8394b1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.client-task-card__footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--hk-border, #eef1f6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
}

.client-task-card__assignees {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.client-task-card__footer-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--hk-text-secondary, #8394b1);
  text-transform: uppercase;
}

.client-task-card__avatars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.client-task-card__priority {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  background: var(--hk-surface-muted, #f5f7fb);
  color: var(--hk-text-secondary, #8394b1);
  border: 1px solid var(--hk-border, #e4e9f2);
  text-transform: capitalize;
  flex-shrink: 0;
}

.client-task-card__priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.client-task-card__priority--critical {
  color: #e11d48;
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.25);
}

.client-task-card__priority--high {
  color: #d97706;
  background: rgba(217, 119, 6, 0.10);
  border-color: rgba(217, 119, 6, 0.25);
}

.client-task-card__priority--medium {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.22);
}

.client-task-card__priority--low,
.client-task-card__priority--lowest {
  color: #0e9488;
  background: rgba(20, 184, 166, 0.10);
  border-color: rgba(20, 184, 166, 0.22);
}

/* Priority left accent inside the card */
.client-task-card-slot--critical .client-task-card__priority-bar {
  background: linear-gradient(180deg, #e11d48 0%, #f43f5e 100%);
}
.client-task-card-slot--high .client-task-card__priority-bar {
  background: linear-gradient(180deg, #d97706 0%, #f59e0b 100%);
}

/* ---------------------------------------------------------- */
/* Activity tab (used by client + contact activity-tab.vue)   */
/* ---------------------------------------------------------- */
.client-activity-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 12px;
  margin: 4px 0 0;
  border-top: 1px solid var(--hk-border, #e4e9f2);
  flex-wrap: wrap;
}

.client-activity-section-header .client-section-title {
  font-family: var(--hk-font, inherit);
  font-size: 14px;
  font-weight: 600;
  color: var(--hk-text-primary, #283042);
  margin: 0;
  line-height: 1.2;
}

.client-activity-section-header .client-section-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.client-activity-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-activity-actions .hotkup-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  font-family: var(--hk-font, inherit);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--hk-text-secondary, #8394b1);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.client-activity-actions .hotkup-toggle-btn:hover {
  background: var(--hk-surface-muted, #f5f7fb);
  color: var(--hk-text-primary, #283042);
}

.client-activity-stream {
  background: var(--hk-surface-muted, #f5f7fb);
  border: 1px solid var(--hk-border, #e4e9f2);
  border-radius: var(--hk-radius-md, 8px);
  padding: 16px;
  margin-top: 4px;
  overflow-x: hidden;
  flex-grow: 1;
  position: relative;
}

/* The activity card itself (existing scoped CSS still applies; this is a
   non-scoped tweak that aligns colors with the design tokens). */
.client-activity-stream .activity_description > div {
  background: var(--hk-surface, #fff);
  border-color: var(--hk-border, #e4e9f2);
  box-shadow: var(--hk-shadow-card, 0 1px 3px rgba(40, 48, 66, 0.04));
}

.client-activity-stream .activity-sno {
  background: var(--hk-brand-primary, #2579ff);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.3px;
  border-radius: 4px;
  padding: 0 4px;
  min-width: 22px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Comment editor surrounding card */
.activity-comment-container {
  background: var(--hk-surface, #fff);
  border: 1px solid var(--hk-border, #e4e9f2);
  border-radius: var(--hk-radius-md, 8px);
  box-shadow: var(--hk-shadow-card, 0 1px 3px rgba(40, 48, 66, 0.04));
  padding: 8px 10px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.activity-comment-container:focus-within {
  border-color: var(--hk-brand-primary, #2579ff);
  box-shadow: 0 0 0 3px rgba(37, 121, 255, 0.10);
}

/* Flatten the inner editor so the card and input don't both have borders.
   The outer .activity-comment-container card is now the only chrome. */
.activity-comment-container .comment-input-box {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 6px 4px !important;
  min-height: 36px !important;
  font-size: 13px;
  line-height: 1.5;
  outline: none !important;
}

.activity-comment-container .comment-input-box:focus,
.activity-comment-container .comment-input-box:active {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Empty-state placeholder color */
.activity-comment-container .comment-input-box:empty::before {
  content: attr(placeholder);
  color: var(--hk-text-secondary, #8394b1);
  pointer-events: none;
}

/* Attachment icons next to the Post button */
.activity-comment-container .comment-attachment {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px !important;
}

.activity-comment-container .comment-attachment > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-comment-container .comment-attachment span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.activity-comment-container .comment-attachment span:hover {
  background: var(--hk-surface-muted, #f5f7fb);
}

.activity-comment-container .comment-attachment img {
  width: 16px !important;
  height: 16px !important;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.activity-comment-container .comment-attachment span:hover img {
  opacity: 0.95;
}

/* Post button — sized to match the design system primary button */
.activity-comment-container .comment-post-btn {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.activity-comment-container .comment-post-btn button.uk-button-primary {
  background: var(--hk-brand-primary, #2579ff) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 6px 18px !important;
  height: 32px !important;
  min-height: 32px !important;
  line-height: 1 !important;
  border-radius: 6px !important;
  border: 1px solid var(--hk-brand-primary, #2579ff) !important;
  text-transform: none !important;
  letter-spacing: 0.2px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.activity-comment-container .comment-post-btn button.uk-button-primary:hover {
  background: #1d6fe0 !important;
  border-color: #1d6fe0 !important;
}

.activity-comment-container .comment-post-btn button.uk-button-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Make the input row align icons + post button vertically with the input */
.activity-comment-container .comment-container {
  align-items: center !important;
}

/* Make activity cards span the available width (was 70% in legacy scoped CSS) */
.client-activity-stream .activity_description > div {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

/* The absolute-positioned Cancel-comment ban-icon container is a direct
   child of .activity_description and was inheriting the card chrome
   (background, border, padding) from the rule above. Strip that chrome
   and re-anchor it inline with the date at the top-right of the card. */
.client-activity-stream .activity_description > div[style*="position: absolute"] {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  left: auto !important;
  right: 90px !important;
  top: 8px !important;
  bottom: auto !important;
  z-index: 4;
  pointer-events: none;
  display: flex !important;
  align-items: center;
}

.client-activity-stream .activity_description > div[style*="position: absolute"] > a.activity_reply_arrow {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50%;
  background: rgba(225, 29, 72, 0.08);
  color: #d93025 !important;
  transition: background 0.15s ease;
  cursor: pointer;
}

.client-activity-stream .activity_description > div[style*="position: absolute"] > a.activity_reply_arrow:hover {
  background: rgba(225, 29, 72, 0.18);
}

.client-activity-stream .activity_description > div[style*="position: absolute"] > a.activity_reply_arrow .uk-icon {
  color: inherit;
}

/* User name in the activity header */
.client-activity-stream .activity-user-name,
.client-activity-stream .activity_description .activity-user-name > span {
  font-weight: 600;
  color: var(--hk-brand-primary, #2579ff);
}

/* Date label inside the activity header */
.client-activity-stream .activity_description .timeago {
  color: var(--hk-text-secondary, #8394b1) !important;
  font-weight: 500 !important;
  letter-spacing: 0.2px;
}

/* Property change rows ("ORGANIZATION LINK -  Arowana Aquarium") */
.client-activity-stream .activity_detail {
  background: var(--hk-surface-muted, #f5f7fb) !important;
  border-left: 3px solid var(--hk-brand-primary, #2579ff) !important;
  border-radius: 6px !important;
  padding: 10px 14px !important;
  margin-top: 12px !important;
  margin-bottom: 6px !important;
}

.client-activity-stream .activity_detail > div {
  padding: 4px 0 !important;
}

.client-activity-stream .activity_detail > div > div:first-child {
  text-transform: uppercase !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.6px !important;
  color: var(--hk-text-secondary, #8394b1) !important;
  opacity: 1 !important;
  min-width: 130px !important;
}

/* Nested reply card under an activity (rules in common.css set width: 50%
   and a 0.5px border — refine to match the design system). */
.client-activity-stream .activity_reply {
  background: var(--hk-surface, #fff) !important;
  border: 1px solid var(--hk-border, #e4e9f2) !important;
  border-radius: var(--hk-radius-md, 8px) !important;
  padding: 10px 14px !important;
  width: 60% !important;
  max-width: 720px;
  margin: 12px 0 !important;
  box-shadow: var(--hk-shadow-card, 0 1px 3px rgba(40, 48, 66, 0.04));
}

.client-activity-stream .activity_reply .activity-user-name span {
  color: var(--hk-brand-primary, #2579ff);
  font-weight: 600;
  font-size: 13px;
}

.client-activity-stream .activity_reply + div {
  font-size: 11px !important;
  color: var(--hk-text-secondary, #8394b1) !important;
  margin: -4px 0 8px 0 !important;
  padding-left: 14px;
}

.client-activity-stream .reply_tree_branch {
  border-color: var(--hk-border, #e4e9f2) !important;
}

.client-activity-stream .reply_tree_trunk {
  border-color: var(--hk-border, #e4e9f2) !important;
}

/* Profile avatar in the activity header — slightly larger with a subtle ring */
.client-activity-stream .activity_description img.ui-navbar-profile-image {
  width: 26px !important;
  height: 26px !important;
  border: 2px solid var(--hk-surface, #fff) !important;
  box-shadow: 0 0 0 1px var(--hk-border, #e4e9f2);
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px !important;
}

/* "Reply" link below each activity */
.client-activity-stream a[id^="activity_reply_link_"] {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  margin-left: 56px !important;
  margin-top: 6px !important;
  padding: 2px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-decoration: none;
  user-select: none;
}

.client-activity-stream a[id^="activity_reply_link_"] > span {
  color: var(--hk-brand-primary, #2579ff) !important;
}

.client-activity-stream a[id^="activity_reply_link_"]:hover > span {
  text-decoration: underline;
}

/* Reply form (inline composer that appears under an activity) */
.client-activity-stream .reply_form {
  background: var(--hk-surface, #fff) !important;
  border: 1px solid var(--hk-border, #e4e9f2) !important;
  border-radius: var(--hk-radius-md, 8px) !important;
  padding: 12px 14px !important;
  margin-left: 56px !important;
  margin-top: 8px !important;
  margin-bottom: 8px;
  box-sizing: border-box;
  box-shadow: var(--hk-shadow-card, 0 1px 3px rgba(40, 48, 66, 0.04));
  width: calc(100% - 56px) !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* The Reply form embeds an inner activity-comment-container; flatten it so
   we don't get a card-inside-a-card visual. */
.client-activity-stream .reply_form .activity-comment-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

.client-activity-stream .reply_form .activity-comment-container:focus-within {
  border: none !important;
  box-shadow: none !important;
}

/* The hard-coded width:50% inner wrapper for the reply textarea */
.client-activity-stream .reply_form .activity-comment-container > .uk-width-1-1 > div[style*="width: 50%"] {
  width: 100% !important;
}

/* Reply textarea */
.client-activity-stream .reply_form .reply-input-box {
  width: 100% !important;
  min-height: 56px !important;
  padding: 10px 12px !important;
  background: var(--hk-surface, #fff) !important;
  border: 1px solid var(--hk-border, #e4e9f2) !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  line-height: 1.45;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.client-activity-stream .reply_form .reply-input-box:focus,
.client-activity-stream .reply_form .reply-input-box:active {
  border-color: var(--hk-brand-primary, #2579ff) !important;
  box-shadow: 0 0 0 3px rgba(37, 121, 255, 0.10) !important;
  outline: none !important;
}

/* Cancel + Reply action buttons */
.client-activity-stream .reply_form button.uk-button-small {
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 6px 14px !important;
  height: auto !important;
  min-height: 30px;
  border-radius: 6px !important;
  letter-spacing: 0.2px;
  border: 1px solid transparent !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-transform: none !important;
}

.client-activity-stream .reply_form button.uk-button-small.uk-button-default {
  background: var(--hk-surface, #fff) !important;
  color: var(--hk-text-secondary, #8394b1) !important;
  border-color: var(--hk-border, #e4e9f2) !important;
}

.client-activity-stream .reply_form button.uk-button-small.uk-button-default:hover {
  color: var(--hk-brand-primary, #2579ff) !important;
  border-color: var(--hk-brand-primary, #2579ff) !important;
}

.client-activity-stream .reply_form button.uk-button-small.uk-button-primary {
  background: var(--hk-brand-primary, #2579ff) !important;
  color: #fff !important;
  border-color: var(--hk-brand-primary, #2579ff) !important;
}

.client-activity-stream .reply_form button.uk-button-small.uk-button-primary:hover {
  background: #1d6fe0 !important;
  border-color: #1d6fe0 !important;
}

/* ---- All Clients list panel (sidebar) ---- */
.client-list-panel {
  font-family: var(--hk-font);
  background: var(--hk-surface) !important;
  border-right: 1px solid var(--hk-border) !important;
  box-shadow: none !important;
  overflow-x: hidden !important;
  max-width: 100%;
  min-width: 240px;
  box-sizing: border-box;
}

.client-list-panel .adk_grid_list_content,
.client-list-panel .elastic_scroll_container,
.client-list-panel .task-list,
.client-list-panel .task_inbox_list {
  overflow-x: hidden !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.client-list-panel .client-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px 6px;
  border-bottom: 1px solid var(--hk-border);
  user-select: none;
}

.client-list-panel .client-list-toolbar__title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.client-list-panel .client-list-toolbar__title,
.client-list-panel .task-list-name {
  margin: 0 !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  line-height: 1.25;
  color: var(--hk-text-primary) !important;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-list-panel .client-list-toolbar__subtitle {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--hk-text-muted);
  margin-left: 6px;
}

.client-list-panel .client-list-toolbar__filter {
  font-size: 10px;
  font-weight: 500;
  color: var(--hk-text-secondary);
}

.client-list-panel .client-list-toolbar__actions {
  flex-shrink: 0;
}

.client-list-panel .client-list-toolbar__buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.client-list-panel .client-list-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  background: var(--hk-surface);
  color: var(--hk-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.client-list-panel .client-list-icon-btn:hover {
  color: var(--hk-brand-primary);
  border-color: rgba(37, 121, 255, 0.35);
  background: var(--hk-brand-primary-light);
}

.client-list-panel .client-list-search {
  position: relative;
  margin: 8px 10px;
  box-sizing: border-box;
}

.client-list-panel .client-list-search__icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hk-text-muted);
  pointer-events: none;
  z-index: 1;
}

.client-list-panel .client-list-search__input {
  width: 100% !important;
  height: 32px !important;
  padding: 0 32px 0 30px !important;
  font-size: 11px !important;
  color: var(--hk-text-primary);
  background: var(--hk-surface-muted) !important;
  border: 1px solid var(--hk-border) !important;
  border-radius: var(--hk-radius-md) !important;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.client-list-panel .client-list-search__input:focus,
.client-list-panel .client-list-search__input:active {
  background: var(--hk-surface) !important;
  border-color: var(--hk-brand-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 121, 255, 0.12);
  outline: none;
}

.client-list-panel .client-list-search__clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--hk-text-muted);
  cursor: pointer;
}

.client-list-panel .client-list-search__clear:hover {
  background: var(--hk-surface-muted);
  color: var(--hk-text-primary);
}

.client-list-panel .task-list {
  background: var(--hk-surface) !important;
}

.client-list-panel .task_inbox_list {
  row-gap: 0 !important;
}

.client-list-panel .client-list-row,
.client-list-panel .contact-list-row,
.client-list-panel .task_item {
  position: relative;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
  border: none !important;
  box-shadow: none !important;
}

.client-list-panel .list-row.client-list-item,
.client-list-panel .list-row.contact-list-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
  min-height: 40px;
  padding: 7px 10px !important;
  margin: 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--hk-border) !important;
  border-left: 3px solid transparent !important;
  border-radius: 0 !important;
  background: var(--hk-surface) !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.client-list-panel .list-row.client-list-item:hover,
.client-list-panel .list-row.contact-list-item:hover {
  background: var(--hk-surface-muted) !important;
}

.client-list-panel .list-row.client-list-item.active,
.client-list-panel .list-row.contact-list-item.active {
  background: var(--hk-brand-primary-light) !important;
  border-left-color: var(--hk-brand-primary) !important;
}

.client-list-panel .list-row.client-list-item.active .active-border,
.client-list-panel .list-row.contact-list-item.active .active-border {
  display: none;
}

.client-list-panel .client-list-item__star,
.client-list-panel .contact-list-item__star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: var(--hk-radius-sm);
  background: transparent;
  color: var(--hk-text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.client-list-panel .client-list-item__star:hover,
.client-list-panel .contact-list-item__star:hover {
  background: rgba(37, 121, 255, 0.08);
  color: var(--hk-brand-primary);
}

.client-list-panel .client-list-item__star--on,
.client-list-panel .client-list-item__star .client-list-item__star--on,
.client-list-panel .contact-list-item__star--on,
.client-list-panel .contact-list-item__star .contact-list-item__star--on {
  color: var(--hk-brand-primary) !important;
}

.client-list-panel .client-list-item__star--on svg,
.client-list-panel .contact-list-item__star--on svg {
  fill: var(--hk-brand-primary) !important;
}

.client-list-panel .client-list-item__star--on svg polygon,
.client-list-panel .client-list-item__star--on svg path,
.client-list-panel .contact-list-item__star--on svg polygon,
.client-list-panel .contact-list-item__star--on svg path {
  fill: var(--hk-brand-primary) !important;
}

.client-list-panel .client-list-item__index,
.client-list-panel .contact-list-item__index {
  flex-shrink: 0;
  min-width: 22px;
  font-size: 10px;
  font-weight: 500;
  color: var(--hk-text-muted);
  font-variant-numeric: tabular-nums;
}

.client-list-panel .client-list-item__name,
.client-list-panel .contact-list-item__name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--hk-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-list-panel .list-row.client-list-item.active .client-list-item__name,
.client-list-panel .list-row.contact-list-item.active .contact-list-item__name {
  font-weight: 600;
  color: var(--hk-brand-primary);
}

.client-list-panel .client-list-item__status,
.client-list-panel .contact-list-item__status {
  flex-shrink: 0;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: #ff6fa0;
  border-radius: 10px;
}

.client-list-panel .client-list-item__status--warn,
.client-list-panel .contact-list-item__status--warn {
  background: #f57c00;
}

.client-list-panel .client-list-item__indicators,
.client-list-panel .contact-list-item__indicators {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.client-list-panel .client-list-item__indicator,
.client-list-panel .contact-list-item__indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--hk-text-secondary);
}

.client-list-panel .client-list-item__indicator [uk-icon],
.client-list-panel .contact-list-item__indicator [uk-icon] {
  transform: scale(0.85);
}

.client-list-panel .client-list-item__dot,
.client-list-panel .contact-list-item__dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e53935;
  border: 1.5px solid var(--hk-surface);
  z-index: 1;
}

.client-list-panel .client-list-item__task-badge,
.client-list-panel .contact-list-item__task-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: var(--hk-brand-primary);
  border-radius: 9px;
  font-variant-numeric: tabular-nums;
}

.client-list-panel .client-list-item--inactive,
.client-list-panel .contact-list-item--inactive {
  opacity: 0.72;
}

.client-list-panel #clientListIntersectionObserver,
.client-list-panel #contactListIntersectionObserver {
  padding: 16px !important;
  font-size: 13px !important;
  color: var(--hk-text-muted) !important;
  background: var(--hk-surface-muted) !important;
  border: none !important;
}

.clients-home-main,
.contacts-home-main {
  overflow-x: hidden;
  min-width: 0;
  max-width: 100%;
}

/* ---- New / Edit Contact modal ---- */
#new-contact-form-modal-from-client-view .uk-modal-dialog,
#new-contact-form-modal .uk-modal-dialog,
.hk-contact-modal {
  display: flex !important;
  flex-direction: column !important;
  width: calc(100% - 32px) !important;
  max-width: 720px !important;
  min-width: 0 !important;
  max-height: calc(100vh - 48px) !important;
  margin: auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: var(--hk-radius-lg) !important;
  border: 1px solid var(--hk-border) !important;
  box-shadow: 0 12px 40px rgba(40, 48, 66, 0.18) !important;
  background: var(--hk-surface) !important;
  font-family: var(--hk-font);
}

.hk-contact-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hk-border);
  background: var(--hk-surface);
}

.hk-contact-modal__title-wrap {
  flex: 1;
  min-width: 0;
}

.hk-contact-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--hk-text-primary);
  letter-spacing: -0.02em;
}

.hk-contact-modal__subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--hk-text-secondary);
}

.hk-contact-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  background: var(--hk-surface);
  color: var(--hk-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hk-contact-modal__close:hover {
  color: var(--hk-text-primary);
  background: var(--hk-surface-muted);
  border-color: var(--hk-border-strong);
}

.hk-contact-modal__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.hk-contact-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  font-family: var(--hk-font);
  font-size: 14px;
  color: var(--hk-text-primary);
  background: var(--hk-surface);
}

.hk-contact-form__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 18px;
  box-sizing: border-box;
}

.hk-contact-form__grid {
  display: block;
  width: 100%;
  margin: 0;
}

.hk-contact-form__fields--compact {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 10px;
  width: 100%;
}

.hk-form-field--col-4 {
  grid-column: span 4;
}

.hk-form-field--col-6 {
  grid-column: span 6;
}

.hk-form-field--col-12 {
  grid-column: span 12;
}

.hk-form-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.hk-form-label {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--hk-text-secondary);
  letter-spacing: 0;
  text-transform: none;
}

.hk-form-required {
  color: #e53935;
  font-weight: 600;
}

.hk-form-error {
  font-size: 11px;
  line-height: 1.2;
  color: #e53935;
}

.hk-contact-form .hk-form-input,
.hk-contact-form .uk-input,
.hk-contact-form .uk-select:not([multiple]):not([size]) {
  height: 34px !important;
  width: 100% !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--hk-text-primary) !important;
  background: var(--hk-surface) !important;
  border: 1px solid var(--hk-border) !important;
  border-radius: var(--hk-radius-md) !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hk-contact-form .hk-form-input:focus,
.hk-contact-form .uk-input:focus {
  border-color: var(--hk-brand-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 121, 255, 0.12) !important;
  outline: none !important;
}

.hk-contact-form .hk-form-control {
  min-height: 34px;
}

.hk-contact-form__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  padding: 10px 18px;
  border-top: 1px solid var(--hk-border);
  background: var(--hk-surface-muted);
}

.hk-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 34px;
  padding: 0 16px;
  font-family: var(--hk-font);
  font-size: 14px;
  font-weight: 600;
  color: #fff !important;
  background: var(--hk-brand-primary) !important;
  border: none !important;
  border-radius: var(--hk-radius-md) !important;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.hk-btn-primary:hover {
  background: var(--hk-brand-primary-hover) !important;
  box-shadow: 0 2px 8px rgba(37, 121, 255, 0.25);
}

.hk-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 34px;
  padding: 0 16px;
  font-family: var(--hk-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--hk-text-secondary) !important;
  background: var(--hk-surface) !important;
  border: 1px solid var(--hk-border-strong) !important;
  border-radius: var(--hk-radius-md) !important;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hk-btn-secondary:hover {
  color: var(--hk-text-primary) !important;
  background: var(--hk-surface-muted) !important;
}

/* Inline variant: contact details form embedded in a tab (no surrounding modal chrome) */
.hk-contact-form--inline {
  background: transparent;
}

.hk-contact-form--inline .hk-contact-form__scroll {
  padding: 14px 24px 8px;
}

.hk-contact-form--inline .hk-contact-form__footer {
  background: transparent;
  border-top: 1px solid var(--hk-border);
  padding: 12px 24px;
}

@media (max-width: 640px) {
  .hk-contact-form__fields--compact .hk-form-field--col-4,
  .hk-contact-form__fields--compact .hk-form-field--col-6 {
    grid-column: span 12;
  }

  .hk-contact-modal__header,
  .hk-contact-form__scroll,
  .hk-contact-form__footer {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ---- Contacts tab: toolbar ---- */
.hk-module .client-contact-action-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hk-module .client-contact-action-wrapper .client-button-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hk-module .client-contact-action-wrapper .client-button-group .new_contact_btn,
.hk-module .client-contact-action-wrapper .client-button-group .link_contact_btn {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--hk-radius-md);
  font-size: 13px;
  font-weight: 600;
  background: var(--hk-brand-primary);
  color: #fff;
  border: 1px solid var(--hk-brand-primary);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.hk-module .client-contact-action-wrapper .client-button-group .new_contact_btn:hover,
.hk-module .client-contact-action-wrapper .client-button-group .link_contact_btn:hover {
  background: var(--hk-brand-primary-hover);
  border-color: var(--hk-brand-primary-hover);
}

.hk-module .client-contact-action-wrapper .client-button-group .new_contact_btn:active,
.hk-module .client-contact-action-wrapper .client-button-group .link_contact_btn:active {
  transform: translateY(1px);
}

/* Search input (design-system) */
.hk-contacts-search {
  position: relative;
  flex: 1 1 320px;
  min-width: 220px;
  max-width: 420px;
  display: inline-flex;
  align-items: center;
}

.hk-contacts-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hk-text-muted);
  pointer-events: none;
  z-index: 1;
  display: inline-flex;
}

.hk-contacts-search__input {
  width: 100%;
  height: 36px;
  padding: 0 36px 0 36px;
  font-size: 13px;
  color: var(--hk-text-primary);
  background: var(--hk-surface-muted);
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.hk-contacts-search__input::placeholder {
  color: var(--hk-text-muted);
}

.hk-contacts-search__input:focus,
.hk-contacts-search__input:active {
  background: var(--hk-surface);
  border-color: var(--hk-brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 121, 255, 0.12);
  outline: none;
}

.hk-contacts-search__clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--hk-text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}

.hk-contacts-search__clear:hover {
  color: var(--hk-text-primary);
  background: rgba(40, 48, 66, 0.06);
}

/* ---- Contacts tab: card / list view toggle ---- */
.client-contacts-view-toggle {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  overflow: hidden;
  background: var(--hk-surface-muted);
}

.client-contacts-view-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--hk-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.client-contacts-view-toggle__btn + .client-contacts-view-toggle__btn {
  border-left: 1px solid var(--hk-border);
}

.client-contacts-view-toggle__btn:hover {
  color: var(--hk-text-primary);
  background: rgba(255, 255, 255, 0.7);
}

.client-contacts-view-toggle__btn.is-active {
  color: #fff;
  background: var(--hk-brand-primary);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--hk-brand-primary);
}

.client-contacts-view-toggle__btn.is-active:hover {
  color: #fff;
  background: var(--hk-brand-primary);
}

/* Card grid override (replace flex-wrap to match Task tab layout) */
.client-contact-card-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
  padding: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
}

.client-contact-card-wrapper[style*="display: none"],
.client-contact-list-wrapper[style*="display: none"] {
  display: none !important;
}

@media (max-width: 1280px) {
  .client-contact-card-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .client-contact-card-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
}

.client-contact-card-wrapper > .client-card-container,
.client-contact-card-wrapper > .hk-contact-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  max-height: none !important;
  box-sizing: border-box;
}

/* ---- Contact card (refreshed design) ---- */
.hk-contact-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  background: var(--hk-surface);
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  box-shadow: var(--hk-shadow-card);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  min-width: 0;
  position: relative;
  outline: none;
}

.hk-contact-card:hover {
  border-color: rgba(37, 121, 255, 0.45);
  box-shadow: 0 6px 18px rgba(37, 121, 255, 0.12);
  transform: translateY(-1px);
}

.hk-contact-card__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.hk-contact-card__avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--hk-brand-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  user-select: none;
}

.hk-contact-card__identity {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hk-contact-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--hk-text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-contact-card__meta {
  font-size: 12px;
  color: var(--hk-text-muted);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hk-contact-card__meta-sep {
  color: var(--hk-border-strong);
}

.hk-contact-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hk-contact-card__tag {
  display: inline-block;
  max-width: 110px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border: 1px solid rgba(37, 121, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.hk-contact-card__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--hk-radius-sm);
  background: transparent;
  color: var(--hk-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hk-contact-card__icon-btn:hover {
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border-color: rgba(37, 121, 255, 0.25);
}

.hk-contact-card__icon-btn--danger:hover {
  color: #d6336c;
  background: rgba(214, 51, 108, 0.08);
  border-color: rgba(214, 51, 108, 0.25);
}

/* Organization variant: square-ish avatar housing a home/building icon */
.hk-contact-card__avatar--org {
  border-radius: var(--hk-radius-md, 8px);
  font-size: 0;
}

.hk-contact-card__avatar--org > .uk-icon,
.hk-contact-card__avatar--org > [uk-icon] {
  color: #fff;
}

.hk-contact-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--hk-border);
}

.hk-contact-card__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--hk-text-secondary);
  line-height: 1.4;
  min-width: 0;
}

.hk-contact-card__row-icon {
  flex-shrink: 0;
  color: var(--hk-text-muted);
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hk-contact-card__row-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-contact-card__row-link {
  color: var(--hk-brand-primary);
  text-decoration: none;
}

.hk-contact-card__row-link:hover {
  text-decoration: underline;
}

.hk-contact-card__empty {
  font-size: 12px;
  color: var(--hk-text-muted);
  font-style: italic;
}

/* Empty state */
.client-contacts-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  margin: 0;
  text-align: center;
  padding: 24px;
  color: var(--hk-text-secondary);
  font-size: 14px;
  background: var(--hk-surface-muted);
  border-radius: var(--hk-radius-md);
  border: 1px dashed var(--hk-border);
}

/* List view */
.client-contact-list-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  background: var(--hk-surface);
}

.client-contact-list-header,
.client-contact-list-row {
  display: grid;
  grid-template-columns: minmax(150px, 2fr) minmax(110px, 1fr) minmax(180px, 2fr) 120px 120px 80px;
  align-items: center;
  gap: 8px 12px;
  padding: 0 16px;
  box-sizing: border-box;
}

.client-contact-list-header {
  flex-shrink: 0;
  min-height: 40px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hk-text-muted);
  background: var(--hk-surface-muted);
  border-bottom: 1px solid var(--hk-border);
}

.client-contact-list-header__name {
  text-align: left;
}

.client-contact-list-header__actions {
  text-align: right;
}

.client-contact-list-row {
  min-height: 56px;
  font-size: 13px;
  color: var(--hk-text-primary);
  border-bottom: 1px solid var(--hk-border);
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
  position: relative;
  outline: none;
}

.client-contact-list-row:last-child {
  border-bottom: none;
}

.client-contact-list-row:hover {
  background: var(--hk-surface-muted);
}

.client-contact-list-row__cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-contact-list-row__name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.client-contact-list-row__name-text {
  font-weight: 600;
  color: var(--hk-brand-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-contact-list-row__meta {
  font-size: 12px;
  color: var(--hk-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-contact-list-row__tag {
  display: inline-block;
  max-width: 100%;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border: 1px solid rgba(37, 121, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-contact-list-row__email-link {
  color: var(--hk-brand-primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
}

.client-contact-list-row__email-link:hover {
  text-decoration: underline;
}

.client-contact-list-row__muted {
  color: var(--hk-text-muted);
  font-size: 12px;
}

.client-contact-list-row__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  overflow: visible;
}

.client-contact-list-row__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--hk-radius-sm);
  background: transparent;
  color: var(--hk-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.client-contact-list-row__action-btn:hover {
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border-color: rgba(37, 121, 255, 0.25);
}

@media (max-width: 1100px) {
  .client-contact-list-header,
  .client-contact-list-row {
    grid-template-columns: minmax(140px, 2fr) minmax(180px, 2fr) 120px 80px;
  }

  .client-contact-list-header__cell:nth-child(2),
  .client-contact-list-row__category,
  .client-contact-list-header__cell:nth-child(5),
  .client-contact-list-row__city {
    display: none;
  }
}

/* ============================================================
   Mailbox tab — toolbar, list view, card view
   ============================================================ */
.hk-mailbox__toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--hk-border);
  margin-bottom: 12px;
}

.hk-mailbox__toolbar-left {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.hk-mailbox__archived-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--hk-text-primary);
  padding-left: 4px;
}

.hk-mailbox__toolbar-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hk-mailbox__new-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--hk-brand-primary);
  border: 1px solid var(--hk-brand-primary);
  border-radius: var(--hk-radius-md);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(37, 121, 255, 0.2);
}

.hk-mailbox__new-btn:hover {
  background: var(--hk-brand-primary-hover);
  border-color: var(--hk-brand-primary-hover);
}

.hk-mailbox__new-btn-label {
  letter-spacing: 0.01em;
}

.hk-mailbox__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  background: var(--hk-surface);
  color: var(--hk-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hk-mailbox__icon-btn:hover {
  color: var(--hk-brand-primary);
  border-color: rgba(37, 121, 255, 0.45);
  background: var(--hk-brand-primary-light);
}

/* Toggle */
.hk-mailbox-view-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  overflow: hidden;
  background: var(--hk-surface-muted);
}

.hk-mailbox-view-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--hk-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.hk-mailbox-view-toggle__btn + .hk-mailbox-view-toggle__btn {
  border-left: 1px solid var(--hk-border);
}

.hk-mailbox-view-toggle__btn:hover {
  color: var(--hk-text-primary);
  background: rgba(255, 255, 255, 0.7);
}

.hk-mailbox-view-toggle__btn.is-active {
  color: #fff;
  background: var(--hk-brand-primary);
  box-shadow: inset 0 0 0 1px var(--hk-brand-primary);
}

.hk-mailbox-view-toggle__btn.is-active:hover {
  background: var(--hk-brand-primary);
  color: #fff;
}

/* Divider between days/sections */
.hk-email-divider {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hk-text-muted);
  padding: 14px 4px 6px;
  border-bottom: 1px solid var(--hk-border);
  margin-bottom: 4px;
}

/* ---- LIST view ---- */
.hk-email-collection--list {
  display: flex;
  flex-direction: column;
  padding: 4px 0 50px;
  width: 100%;
  box-sizing: border-box;
}

.hk-email-collection--list .hk-email-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 110px 36px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hk-border);
  background: var(--hk-surface);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.hk-email-collection--list .hk-email-item:hover {
  background: var(--hk-surface-muted);
}

.hk-email-collection--list .hk-email-item:last-child {
  border-bottom: none;
}

.hk-email-item__indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d6d6d6;
  border: 1px solid #c5c5c5;
  flex-shrink: 0;
}

.hk-email-item__indicator--unread {
  background: #22c55e;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.hk-email-item__body {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}

.hk-email-collection--list .hk-email-item__body {
  flex-direction: row;
}

.hk-email-item__subject {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  color: var(--hk-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hk-email-item--unread .hk-email-item__subject {
  font-weight: 600;
  color: #1f2937;
}

.hk-email-item--read .hk-email-item__subject {
  font-weight: 400;
  color: var(--hk-text-secondary);
}

.hk-email-item__replies {
  font-size: 11px;
  font-weight: 500;
  color: var(--hk-text-muted);
  white-space: nowrap;
}

.hk-email-item__chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--hk-text-muted);
  background: var(--hk-surface-muted);
  border: 1px solid var(--hk-border);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}

.hk-email-item__recipient {
  flex: 0 1 auto;
  max-width: 280px;
  font-size: 12px;
  color: var(--hk-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hk-email-item__date {
  font-size: 12px;
  color: var(--hk-text-muted);
  text-align: right;
  white-space: nowrap;
}

.hk-email-item__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.hk-email-item:hover .hk-email-item__actions {
  opacity: 1;
}

.hk-email-item__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--hk-radius-sm);
  background: transparent;
  color: var(--hk-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hk-email-item__action-btn:hover {
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border-color: rgba(37, 121, 255, 0.25);
}

/* ---- CARD view ---- */
.hk-email-collection--card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 4px 0 50px;
  width: 100%;
  box-sizing: border-box;
  align-content: start;
}

@media (max-width: 1280px) {
  .hk-email-collection--card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hk-email-collection--card {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hk-email-collection--card .hk-email-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--hk-surface);
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  box-shadow: var(--hk-shadow-card);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  position: relative;
  min-width: 0;
}

.hk-email-collection--card .hk-email-item:hover {
  border-color: rgba(37, 121, 255, 0.45);
  box-shadow: 0 6px 18px rgba(37, 121, 255, 0.12);
  transform: translateY(-1px);
}

.hk-email-collection--card .hk-email-item--unread {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(180deg, #f7fcf9 0%, var(--hk-surface) 60%);
}

.hk-email-collection--card .hk-email-item__indicator {
  position: absolute;
  top: 14px;
  right: 14px;
}

.hk-email-collection--card .hk-email-item__body {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding-right: 22px;
}

.hk-email-collection--card .hk-email-item__subject {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  line-height: 1.35;
  flex-wrap: wrap;
  font-size: 14px;
}

.hk-email-collection--card .hk-email-item__recipient {
  max-width: 100%;
  font-size: 12px;
}

.hk-email-collection--card .hk-email-item__date {
  align-self: flex-start;
  padding-top: 8px;
  border-top: 1px dashed var(--hk-border);
  width: 100%;
  text-align: left;
  font-size: 11.5px;
}

.hk-email-collection--card .hk-email-item__actions {
  position: absolute;
  bottom: 8px;
  right: 8px;
  opacity: 0;
}

.hk-email-collection--card .hk-email-item:hover .hk-email-item__actions {
  opacity: 1;
}

/* ============================================================
   Files tab — toolbar, card view, list view
   ============================================================ */
.hk-module .client-file-action-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hk-border);
}

.hk-module .client-file-action-wrapper .client-button-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Search */
.hk-files-search {
  position: relative;
  flex: 1 1 320px;
  min-width: 220px;
  max-width: 420px;
  display: inline-flex;
  align-items: center;
}

.hk-files-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hk-text-muted);
  pointer-events: none;
  z-index: 1;
  display: inline-flex;
}

.hk-files-search__input {
  width: 100%;
  height: 36px;
  padding: 0 36px 0 36px;
  font-size: 13px;
  color: var(--hk-text-primary);
  background: var(--hk-surface-muted);
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.hk-files-search__input::placeholder {
  color: var(--hk-text-muted);
}

.hk-files-search__input:focus,
.hk-files-search__input:active {
  background: var(--hk-surface);
  border-color: var(--hk-brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 121, 255, 0.12);
  outline: none;
}

.hk-files-search__clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--hk-text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}

.hk-files-search__clear:hover {
  color: var(--hk-text-primary);
  background: rgba(40, 48, 66, 0.06);
}

/* View toggle */
.client-files-view-toggle {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  overflow: hidden;
  background: var(--hk-surface-muted);
}

.client-files-view-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--hk-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.client-files-view-toggle__btn + .client-files-view-toggle__btn {
  border-left: 1px solid var(--hk-border);
}

.client-files-view-toggle__btn:hover {
  color: var(--hk-text-primary);
  background: rgba(255, 255, 255, 0.7);
}

.client-files-view-toggle__btn.is-active {
  color: #fff;
  background: var(--hk-brand-primary);
  box-shadow: inset 0 0 0 1px var(--hk-brand-primary);
}

.client-files-view-toggle__btn.is-active:hover {
  background: var(--hk-brand-primary);
  color: #fff;
}

/* Upload button */
.hk-files-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--hk-brand-primary);
  border: 1px solid var(--hk-brand-primary);
  border-radius: var(--hk-radius-md);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 2px rgba(37, 121, 255, 0.2);
}

.hk-files-upload-btn:hover:not(:disabled) {
  background: var(--hk-brand-primary-hover);
  border-color: var(--hk-brand-primary-hover);
}

.hk-files-upload-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hk-files-upload-btn__label {
  letter-spacing: 0.01em;
}

/* Card grid wrapper */
.client-file-card-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
  padding: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-width: 1280px) {
  .client-file-card-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .client-file-card-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
}

.client-file-card-wrapper[style*="display: none"],
.client-file-list-wrapper[style*="display: none"] {
  display: none !important;
}

/* File card */
.hk-file-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--hk-surface);
  border: 1px solid var(--hk-border);
  border-left: 3px solid var(--hk-brand-primary);
  border-radius: var(--hk-radius-md);
  box-shadow: var(--hk-shadow-card);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  min-width: 0;
  position: relative;
  outline: none;
}

.hk-file-card:hover {
  border-color: rgba(37, 121, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(37, 121, 255, 0.25), inset 3px 0 0 0 var(--hk-brand-primary), 0 4px 12px rgba(37, 121, 255, 0.10);
  transform: translateY(-1px);
}

.hk-file-card__preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.hk-file-card__thumb,
.hk-file-list-row__thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #eef2f7, #dbe3ee);
  color: #4b5563;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  user-select: none;
  border: 1px solid var(--hk-border);
}

.hk-file-card--pdf .hk-file-card__thumb,
.hk-file-list-row--pdf .hk-file-list-row__thumb {
  background: linear-gradient(135deg, #fde2e2, #fca5a5);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.2);
}

.hk-file-card--sheet .hk-file-card__thumb,
.hk-file-list-row--sheet .hk-file-list-row__thumb {
  background: linear-gradient(135deg, #d1fae5, #6ee7b7);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.25);
}

.hk-file-card--doc .hk-file-card__thumb,
.hk-file-list-row--doc .hk-file-list-row__thumb {
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.25);
}

.hk-file-card--image .hk-file-card__thumb,
.hk-file-list-row--image .hk-file-list-row__thumb {
  background: linear-gradient(135deg, #fef3c7, #fcd34d);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.25);
}

.hk-file-card--video .hk-file-card__thumb,
.hk-file-list-row--video .hk-file-list-row__thumb {
  background: linear-gradient(135deg, #ede9fe, #c4b5fd);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.25);
}

.hk-file-card--archive .hk-file-card__thumb,
.hk-file-list-row--archive .hk-file-list-row__thumb {
  background: linear-gradient(135deg, #fee2e2, #fda4af);
  color: #9f1239;
  border-color: rgba(225, 29, 72, 0.25);
}

.hk-file-card--text .hk-file-card__thumb,
.hk-file-list-row--text .hk-file-list-row__thumb {
  background: linear-gradient(135deg, #e0e7ff, #a5b4fc);
  color: #4338ca;
  border-color: rgba(67, 56, 202, 0.25);
}

.hk-file-card__thumb-ext,
.hk-file-list-row__thumb-ext {
  display: inline-block;
  text-transform: uppercase;
}

.hk-file-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hk-file-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--hk-brand-primary);
  line-height: 1.3;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-file-card__name:hover {
  text-decoration: underline;
}

.hk-file-card__meta {
  font-size: 11px;
  color: var(--hk-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-file-card__meta-sep {
  color: var(--hk-border-strong);
}

.hk-file-card__actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.hk-file-card__action-btn,
.hk-file-list-row__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--hk-radius-sm);
  background: transparent;
  color: var(--hk-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hk-file-card__action-btn:hover,
.hk-file-list-row__action-btn:hover {
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border-color: rgba(37, 121, 255, 0.25);
}

.hk-file-card__action-btn--download:hover {
  color: #22c55e;
  background: #f0fdf4;
  border-color: rgba(34, 197, 94, 0.25);
}

.hk-file-card__action-btn--preview:hover {
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border-color: rgba(37, 121, 255, 0.25);
}

.hk-file-card__more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: transparent;
  color: var(--hk-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hk-file-card__more-btn:hover {
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border-color: rgba(37, 121, 255, 0.25);
}

/* List view */
.client-file-list-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  background: var(--hk-surface);
}

.client-file-list-header,
.hk-file-list-row {
  display: grid;
  grid-template-columns: 56px minmax(180px, 3fr) 90px 100px minmax(140px, 1.5fr) 60px;
  align-items: center;
  gap: 8px 12px;
  padding: 0 16px;
  box-sizing: border-box;
}

.client-file-list-header {
  flex-shrink: 0;
  min-height: 40px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hk-text-muted);
  background: var(--hk-surface-muted);
  border-bottom: 1px solid var(--hk-border);
}

.hk-file-list-row {
  min-height: 56px;
  font-size: 13px;
  color: var(--hk-text-primary);
  border-bottom: 1px solid var(--hk-border);
  transition: background 0.12s ease;
}

.hk-file-list-row:last-child {
  border-bottom: none;
}

.hk-file-list-row:hover {
  background: var(--hk-surface-muted);
}

.hk-file-list-row__cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-file-list-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.hk-file-list-row__thumb {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  font-size: 9px;
}

.hk-file-list-row__name-link {
  font-weight: 600;
  color: var(--hk-brand-primary);
  text-decoration: none;
}

.hk-file-list-row__name-link:hover {
  text-decoration: underline;
}

.hk-file-list-row__tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--hk-text-secondary);
  background: var(--hk-surface-muted);
  border: 1px solid var(--hk-border);
  border-radius: 10px;
  text-transform: uppercase;
}

.hk-file-list-row__muted {
  color: var(--hk-text-muted);
  font-size: 12px;
}

.hk-file-list-row__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .client-file-list-header,
  .hk-file-list-row {
    grid-template-columns: 48px minmax(160px, 3fr) 90px minmax(140px, 1.5fr) 60px;
  }

  .client-file-list-header__cell:nth-child(4),
  .hk-file-list-row__size {
    display: none;
  }
}

/* Empty state polish */
.client-files-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 48px 24px;
  color: var(--hk-text-muted);
  font-size: 14px;
  background: var(--hk-surface-muted);
  border-radius: var(--hk-radius-md);
  border: 1px dashed var(--hk-border);
}

.client-files-empty p {
  margin: 8px 0 0;
  color: var(--hk-text-secondary);
}

.client-files-empty__hint {
  font-size: 12px;
  color: var(--hk-text-muted);
}

/* ============================================================
   Recurring tab — header + list view
   ============================================================ */
.hk-recurring-panel {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.hk-recurring-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hk-border);
}

.hk-recurring-panel__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hk-recurring-panel__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--hk-text-primary);
  letter-spacing: 0.01em;
}

.hk-recurring-panel__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border: 1px solid rgba(37, 121, 255, 0.2);
  border-radius: 10px;
}

.hk-recurring-panel__refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  background: var(--hk-surface);
  color: var(--hk-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hk-recurring-panel__refresh:hover {
  color: var(--hk-brand-primary);
  border-color: rgba(37, 121, 255, 0.45);
  background: var(--hk-brand-primary-light);
}

/* Empty state */
.hk-recurring-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  padding: 24px;
  margin: 0;
  text-align: center;
  color: var(--hk-text-secondary);
  font-size: 14px;
  background: var(--hk-surface-muted);
  border-radius: var(--hk-radius-md);
  border: 1px dashed var(--hk-border);
}

.hk-recurring-empty p {
  margin: 8px 0 0;
  color: var(--hk-text-secondary);
}

.hk-recurring-empty__hint {
  font-size: 12px;
  color: var(--hk-text-muted);
}

/* List wrapper */
.hk-recurring-list {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  background: var(--hk-surface);
}

.hk-recurring-list__header,
.hk-recurring-list__row {
  display: grid;
  grid-template-columns: 80px minmax(220px, 3fr) 160px minmax(220px, 2fr) 140px;
  align-items: center;
  gap: 8px 16px;
  padding: 0 16px;
  box-sizing: border-box;
}

.hk-recurring-list__header {
  flex-shrink: 0;
  min-height: 40px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hk-text-muted);
  background: var(--hk-surface-muted);
  border-bottom: 1px solid var(--hk-border);
}

.hk-recurring-list__cell--sno {
  text-align: left;
}

.hk-recurring-list__cell--actions {
  justify-self: end;
  text-align: right;
}

.hk-recurring-list__group {
  border-bottom: 1px solid var(--hk-border);
  background: var(--hk-surface);
  transition: background 0.12s ease;
}

.hk-recurring-list__group:last-child {
  border-bottom: none;
}

.hk-recurring-list__group:hover {
  background: var(--hk-surface-muted);
}

.hk-recurring-list__row {
  min-height: 52px;
  font-size: 13px;
}

.hk-recurring-list__cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-recurring-list__cell--title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hk-recurring-list__sno-link {
  font-family: var(--hk-font);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hk-brand-primary);
  text-decoration: none;
  cursor: pointer;
}

.hk-recurring-list__sno-link:hover {
  text-decoration: underline;
}

.hk-recurring-list__status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.hk-recurring-list__status-dot--enabled {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.hk-recurring-list__status-dot--disabled {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.hk-recurring-list__status-dot--cancelled {
  background: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.3);
}

.hk-recurring-list__title-link {
  font-weight: 600;
  color: var(--hk-text-primary);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.hk-recurring-list__title-link:hover {
  text-decoration: underline;
}

.hk-recurring-list__title-link--enabled {
  color: #047857;
}

.hk-recurring-list__title-link--disabled {
  color: #b45309;
}

.hk-recurring-list__title-link--cancelled {
  color: var(--hk-text-muted);
  text-decoration: line-through;
}

.hk-recurring-list__mono {
  font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--hk-text-secondary);
  letter-spacing: -0.01em;
}

.hk-recurring-list__ago {
  margin-left: 6px;
  font-size: 11px;
  color: var(--hk-brand-primary);
  letter-spacing: 0.02em;
}

.hk-recurring-list__ago--muted {
  color: var(--hk-text-muted);
}

.hk-recurring-list__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.hk-recurring-list__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--hk-radius-sm);
  background: transparent;
  color: var(--hk-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hk-recurring-list__action-btn:hover {
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border-color: rgba(37, 121, 255, 0.25);
}

.hk-recurring-list__action-btn--toggle {
  font-size: 16px;
}

.hk-recurring-list__action-btn--toggle.is-on {
  color: var(--hk-brand-primary);
}

.hk-recurring-list__action-btn--danger:hover {
  color: #dc2626;
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.25);
}

.hk-recurring-list__cancelled-pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hk-text-muted);
  background: var(--hk-surface-muted);
  border: 1px solid var(--hk-border);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Polished detail expandable */
.hk-recurring-list__group .rtask_detail {
  background: var(--hk-surface-muted) !important;
  border-top: 1px dashed var(--hk-border);
  padding: 14px 24px !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  color: var(--hk-text-secondary);
}

@media (max-width: 1100px) {
  .hk-recurring-list__header,
  .hk-recurring-list__row {
    grid-template-columns: 70px minmax(180px, 3fr) minmax(200px, 2fr) 130px;
  }

  .hk-recurring-list__header .hk-recurring-list__cell--date,
  .hk-recurring-list__row .hk-recurring-list__cell--date {
    display: none;
  }
}

/* ============================================================
   Reminders tab — header + list view
   ============================================================ */
.hk-reminders-panel {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.hk-reminders-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hk-border);
}

.hk-reminders-panel__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hk-reminders-panel__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--hk-text-primary);
  letter-spacing: 0.01em;
}

.hk-reminders-panel__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border: 1px solid rgba(37, 121, 255, 0.2);
  border-radius: 10px;
}

.hk-reminders-panel__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hk-reminders-panel__add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--hk-brand-primary);
  border: 1px solid var(--hk-brand-primary);
  border-radius: var(--hk-radius-md);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 2px rgba(37, 121, 255, 0.2);
}

.hk-reminders-panel__add-btn:hover {
  background: var(--hk-brand-primary-hover);
  border-color: var(--hk-brand-primary-hover);
}

.hk-reminders-panel__add-btn-label {
  letter-spacing: 0.01em;
}

/* Empty state */
.hk-reminders-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--hk-text-muted);
  font-size: 14px;
  background: var(--hk-surface-muted);
  border-radius: var(--hk-radius-md);
  border: 1px dashed var(--hk-border);
}

.hk-reminders-empty p {
  margin: 8px 0 0;
  color: var(--hk-text-secondary);
}

.hk-reminders-empty__hint {
  font-size: 12px;
  color: var(--hk-text-muted);
}

/* List */
.hk-reminders-list {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  background: var(--hk-surface);
}

.hk-reminders-list__header,
.hk-reminders-list__row {
  display: grid;
  grid-template-columns: 60px minmax(220px, 3fr) minmax(140px, 1fr) minmax(150px, 1.4fr) 140px;
  align-items: center;
  gap: 8px 16px;
  padding: 0 16px;
  box-sizing: border-box;
}

.hk-reminders-list__header {
  flex-shrink: 0;
  min-height: 40px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hk-text-muted);
  background: var(--hk-surface-muted);
  border-bottom: 1px solid var(--hk-border);
}

.hk-reminders-list__cell--actions {
  justify-self: start;
  text-align: left;
}

.hk-reminders-list__row {
  min-height: 56px;
  font-size: 13px;
  color: var(--hk-text-primary);
  border-bottom: 1px solid var(--hk-border);
  transition: background 0.12s ease;
}

.hk-reminders-list__row:last-child {
  border-bottom: none;
}

.hk-reminders-list__row:hover {
  background: var(--hk-surface-muted);
}

.hk-reminders-list__row--cancelled,
.hk-reminders-list__row--elapsed {
  opacity: 0.78;
}

.hk-reminders-list__cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-reminders-list__cell--title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hk-reminders-list__cell--actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.hk-reminders-list__sno {
  font-family: var(--hk-font);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--hk-text-muted);
}

.hk-reminders-list__status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.hk-reminders-list__status-dot--active {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.hk-reminders-list__status-dot--cancelled {
  background: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.3);
}

.hk-reminders-list__status-dot--elapsed {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.hk-reminders-list__title-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.hk-reminders-list__title {
  font-weight: 600;
  color: var(--hk-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-reminders-list__row--cancelled .hk-reminders-list__title {
  color: var(--hk-text-muted);
  text-decoration: line-through;
}

.hk-reminders-list__row--elapsed .hk-reminders-list__title {
  color: var(--hk-text-secondary);
}

.hk-reminders-list__title-meta {
  font-size: 11.5px;
  color: var(--hk-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-reminders-list__type-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0.01em;
}

.hk-reminders-list__type-tag--app {
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid rgba(29, 78, 216, 0.18);
}

.hk-reminders-list__type-tag--email {
  color: #047857;
  background: #d1fae5;
  border: 1px solid rgba(4, 120, 87, 0.2);
}

.hk-reminders-list__type-tag--other {
  color: var(--hk-text-secondary);
  background: var(--hk-surface-muted);
  border: 1px solid var(--hk-border);
}

.hk-reminders-list__mono {
  font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--hk-text-secondary);
  letter-spacing: -0.01em;
}

.hk-reminders-list__cancel-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hk-text-secondary);
  background: transparent;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hk-reminders-list__cancel-btn:hover {
  color: #dc2626;
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.3);
}

.hk-reminders-list__status-pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
}

.hk-reminders-list__status-pill--cancelled {
  color: var(--hk-text-muted);
  background: var(--hk-surface-muted);
  border: 1px solid var(--hk-border);
}

.hk-reminders-list__status-pill--elapsed {
  color: #047857;
  background: #d1fae5;
  border: 1px solid rgba(4, 120, 87, 0.2);
}

@media (max-width: 1100px) {
  .hk-reminders-list__header,
  .hk-reminders-list__row {
    grid-template-columns: 50px minmax(180px, 3fr) minmax(150px, 1.4fr) 110px;
  }

  .hk-reminders-list__header .hk-reminders-list__cell--type,
  .hk-reminders-list__row .hk-reminders-list__cell--type {
    display: none;
  }
}

/* ============================================================
   Forms tab — toolbar + list view
   ============================================================ */
.hk-forms-panel {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.hk-forms-panel__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--hk-border);
}

.hk-forms-panel__toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.hk-forms-panel__toolbar-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hk-forms-panel__toolbar-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--hk-text-primary);
  letter-spacing: 0.01em;
}

.hk-forms-panel__loading {
  font-size: 10.5px;
  font-style: italic;
  font-weight: 500;
  color: var(--hk-brand-primary);
  text-transform: none;
  letter-spacing: 0;
}

.hk-forms-panel__select-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.hk-forms-panel__select {
  width: 100%;
  height: 36px;
  padding: 0 36px 0 12px;
  font-size: 13px;
  color: var(--hk-text-primary);
  background: var(--hk-surface);
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.hk-forms-panel__select:focus,
.hk-forms-panel__select:active {
  border-color: var(--hk-brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 121, 255, 0.12);
  outline: none;
}

.hk-forms-panel__select-caret {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--hk-text-muted);
  display: inline-flex;
}

.hk-forms-panel__toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  align-self: flex-end;
}

.hk-forms-panel__clone-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--hk-brand-primary);
  border: 1px solid var(--hk-brand-primary);
  border-radius: var(--hk-radius-md);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(37, 121, 255, 0.2);
}

.hk-forms-panel__clone-btn:hover:not(:disabled) {
  background: var(--hk-brand-primary-hover);
  border-color: var(--hk-brand-primary-hover);
}

.hk-forms-panel__clone-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.hk-forms-panel__clone-btn-label {
  letter-spacing: 0.01em;
}

/* ---- Ext Forms Modal ---- */
.hk-forms-modal {
  padding-bottom: 50px;
  width: 100%;
  place-self: center;
  display: flex;
  flex-direction: column;
  row-gap: 15px;
  font-size: 0.75rem !important;
}
.hk-forms-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
}
.hk-forms-modal__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--hk-text-primary, #283042);
}
.hk-forms-modal__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.hk-forms-modal__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 100px;
  font-size: 0.65rem;
  line-height: 32px;
  font-weight: normal !important;
  border-radius: 2px;
  padding: 0 14px;
  border: none;
  cursor: pointer;
  color: #fff;
  justify-content: center;
  transition: opacity 0.15s ease;
}
.hk-forms-modal__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.hk-forms-modal__btn--primary {
  background-color: rgb(35, 139, 255);
}
.hk-forms-modal__btn--danger {
  background-color: rgb(236 104 126);
}
.hk-forms-modal__btn-icon {
  height: 0.85rem;
  width: 0.85rem;
  position: relative;
}
.hk-forms-modal__btn-icon--bottom {
  bottom: 2px;
}
.hk-forms-modal__btn-icon--bottom1 {
  bottom: 1px;
}
/* Form body rows */
.hk-forms-modal__row {
  display: flex;
  padding: 5px 0;
  column-gap: 30px;
  margin-right: 15px;
  margin-left: 15px;
}
.hk-forms-modal__col {
  flex: 1;
  min-height: 70px;
}
.hk-forms-modal__col--no-min {
  min-height: unset;
}
.hk-forms-modal__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--hk-text-primary, #283042);
  margin-bottom: 4px;
}
.hk-forms-modal__label--empty {
  visibility: hidden;
}
.hk-forms-modal__input {
  width: 100%;
  height: 35px;
  border-radius: 3px;
  border: 1px solid #888;
  padding: 0 10px;
  font-size: 0.85rem;
  background: rgb(251, 251, 251);
  box-sizing: border-box;
  font-family: inherit;
}
.hk-forms-modal__textarea {
  width: 100%;
  border-radius: 3px;
  border: 1px solid #888;
  padding: 8px 10px;
  font-size: 0.85rem;
  background: rgb(251, 251, 251);
  font-family: Lato, sans-serif;
  font-weight: 300;
  resize: none;
  box-sizing: border-box;
}
.hk-forms-modal__divider {
  border: none;
  border-top: 1px solid rgb(226, 226, 226);
  margin: 10px 15px;
}
.hk-forms-modal__file-zone {
  position: relative;
  border: 1px solid #888;
  padding: 5px;
  border-radius: 4px;
}
.hk-forms-modal__file-trigger {
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #fff;
  background-color: rgb(248, 248, 248);
  color: rgb(128, 126, 126);
  cursor: pointer;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.hk-forms-modal__file-trigger[disabled] {
  cursor: not-allowed;
}
.hk-forms-modal__file-preview {
  overflow-x: hidden;
  display: grid;
  place-items: center;
  grid-template-columns: 1fr 30px;
  border-radius: 5px;
  border: 1px solid #888;
  background-color: transparent;
  padding-left: 10px;
}
.hk-forms-modal__file-preview-img {
  overflow-x: hidden;
  width: 100%;
  padding: 10px;
}
.hk-forms-modal__file-preview-img img {
  height: 60px;
}
.hk-forms-modal__file-remove {
  cursor: pointer;
  height: 100%;
  background: #ededed;
  margin-top: auto;
  margin-bottom: auto;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Footer */
.hk-forms-modal__footer {
  display: flex;
  padding: 25px 0;
  column-gap: 30px;
  margin-right: 15px;
  margin-left: 15px;
  margin-top: 20px;
  justify-content: flex-start;
  border-top: 1px solid rgb(226, 226, 226);
}
.hk-forms-modal__save-btn {
  background-color: rgb(33, 150, 243);
  border-radius: 3px;
  min-width: 100px;
  font-size: 0.85rem;
  line-height: 40px;
  font-weight: normal !important;
  display: inline-block;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0 20px;
  transition: opacity 0.15s ease;
}
.hk-forms-modal__save-btn:hover {
  opacity: 0.9;
}

/* Empty state */
.hk-forms-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 24px;
  margin: 0;
  color: var(--hk-text-secondary);
  font-size: 14px;
  background: var(--hk-surface-muted);
  border-radius: var(--hk-radius-md);
  border: 1px dashed var(--hk-border);
  text-align: center;
}

.hk-forms-empty p {
  margin: 8px 0 0;
  color: var(--hk-text-secondary);
}

.hk-forms-empty__hint {
  font-size: 12px;
  color: var(--hk-text-muted);
  max-width: 480px;
}

/* List */
.hk-forms-list {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius-md);
  background: var(--hk-surface);
}

.hk-forms-list__header,
.hk-forms-list__row {
  display: grid;
  grid-template-columns: 60px minmax(220px, 3fr) minmax(140px, 1.4fr) minmax(160px, 1.6fr) 110px;
  align-items: center;
  gap: 8px 16px;
  padding: 0 16px;
  box-sizing: border-box;
}

.hk-forms-list__header {
  flex-shrink: 0;
  min-height: 40px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hk-text-muted);
  background: var(--hk-surface-muted);
  border-bottom: 1px solid var(--hk-border);
}

.hk-forms-list__cell--actions {
  justify-self: end;
  text-align: right;
}

.hk-forms-list__row {
  min-height: 52px;
  font-size: 13px;
  color: var(--hk-text-primary);
  border-bottom: 1px solid var(--hk-border);
  transition: background 0.12s ease;
}

.hk-forms-list__row:last-child {
  border-bottom: none;
}

.hk-forms-list__row:hover {
  background: var(--hk-surface-muted);
}

.hk-forms-list__row--revoked {
  opacity: 0.78;
}

.hk-forms-list__cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-forms-list__cell--name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hk-forms-list__sno {
  font-family: var(--hk-font);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--hk-text-muted);
}

.hk-forms-list__status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.hk-forms-list__status-dot--published {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.hk-forms-list__status-dot--pending {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.hk-forms-list__status-dot--revoked {
  background: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.3);
}

.hk-forms-list__name-link {
  font-weight: 600;
  color: var(--hk-brand-primary);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.hk-forms-list__name-link:hover {
  text-decoration: underline;
}

.hk-forms-list__row--revoked .hk-forms-list__name-link {
  color: var(--hk-text-muted);
}

.hk-forms-list__tag {
  display: inline-block;
  max-width: 100%;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hk-brand-primary);
  background: var(--hk-brand-primary-light);
  border: 1px solid rgba(37, 121, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.hk-forms-list__template {
  font-size: 12.5px;
  color: var(--hk-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-forms-list__muted {
  color: var(--hk-text-muted);
  font-size: 12px;
}

.hk-forms-list__edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hk-brand-primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--hk-radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hk-forms-list__edit-btn:hover {
  background: var(--hk-brand-primary-light);
  border-color: rgba(37, 121, 255, 0.25);
}

@media (max-width: 1100px) {
  .hk-forms-list__header,
  .hk-forms-list__row {
    grid-template-columns: 50px minmax(200px, 3fr) minmax(150px, 1.6fr) 100px;
  }

  .hk-forms-list__header .hk-forms-list__cell--category,
  .hk-forms-list__row .hk-forms-list__cell--category {
    display: none;
  }
}

/* ============================================================ */
/* Email Templates tab                                          */
/* ============================================================ */

.hk-email-tpl-panel {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  background: var(--hk-surface);
  padding: 16px 20px 20px;
  gap: 14px;
}

.hk-email-tpl-panel__toolbar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.hk-email-tpl-panel__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 360px;
  min-width: 260px;
}

.hk-email-tpl-panel__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hk-text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hk-email-tpl-panel__loading {
  font-size: 10.5px;
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--hk-text-muted);
}

.hk-email-tpl-panel__select-wrap {
  width: 100%;
}

.hk-email-tpl-panel__create-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  background: var(--hk-brand-primary);
  color: #fff;
  border: 1px solid var(--hk-brand-primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.hk-email-tpl-panel__create-btn:hover:not(:disabled) {
  background: var(--hk-brand-primary-hover);
  border-color: var(--hk-brand-primary-hover);
}

.hk-email-tpl-panel__create-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.hk-email-tpl-panel__create-btn-label {
  letter-spacing: 0.01em;
}

.hk-email-tpl-panel__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
}

.hk-email-tpl-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
  color: var(--hk-brand-primary);
}

.hk-email-tpl-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 410px;
  padding: 24px;
  margin: 0;
  text-align: center;
  color: var(--hk-text-secondary);
  background: var(--hk-surface-muted);
  border: 1px dashed var(--hk-border);
  border-radius: var(--hk-radius-md);
}

.hk-email-tpl-empty__icon {
  color: var(--hk-text-muted);
  opacity: 0.6;
  margin-bottom: 4px;
}

.hk-email-tpl-empty p {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--hk-text-primary);
}

.hk-email-tpl-empty__hint {
  font-size: 12px;
  color: var(--hk-text-muted);
  max-width: 460px;
  line-height: 1.55;
}

.hk-email-tpl-list {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  background: var(--hk-surface);
  border: 1px solid var(--hk-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hk-email-tpl-list__header,
.hk-email-tpl-list__row {
  display: grid;
  grid-template-columns: 56px minmax(220px, 2.4fr) minmax(140px, 1.2fr) minmax(140px, 1.2fr) 120px 130px 100px;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--hk-border);
}

.hk-email-tpl-list__header {
  flex-shrink: 0;
  min-height: 40px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hk-text-secondary);
  background: var(--hk-surface-muted);
}

.hk-email-tpl-list__row {
  min-height: 56px;
  font-size: 13px;
  color: var(--hk-text-primary);
  background: var(--hk-surface);
  transition: background 0.15s ease;
}

.hk-email-tpl-list__row:last-child {
  border-bottom: none;
}

.hk-email-tpl-list__row:hover {
  background: var(--hk-surface-muted);
}

.hk-email-tpl-list__row--disabled {
  opacity: 0.78;
}

.hk-email-tpl-list__cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-email-tpl-list__cell--sno {
  text-align: left;
}

.hk-email-tpl-list__sno {
  font-family: var(--hk-font);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--hk-text-muted);
  letter-spacing: 0.02em;
}

.hk-email-tpl-list__cell--name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hk-email-tpl-list__status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hk-email-tpl-list__status-dot--on {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.hk-email-tpl-list__status-dot--off {
  background: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.3);
}

.hk-email-tpl-list__name-link {
  font-weight: 600;
  color: var(--hk-brand-primary);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
  text-decoration: none;
}

.hk-email-tpl-list__name-link:hover {
  text-decoration: underline;
}

.hk-email-tpl-list__row--disabled .hk-email-tpl-list__name-link {
  color: var(--hk-text-secondary);
}

.hk-email-tpl-list__cell--date {
  font-size: 12.5px;
  color: var(--hk-text-secondary);
}

.hk-email-tpl-list__muted {
  color: var(--hk-text-muted);
}

.hk-email-tpl-list__cell--trigger {
  font-size: 12.5px;
}

.hk-email-tpl-list__trigger-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--hk-brand-primary-light);
  color: var(--hk-brand-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.hk-email-tpl-list__trigger-link:hover {
  background: rgba(37, 121, 255, 0.14);
}

.hk-email-tpl-list__trigger-link.is-empty {
  background: var(--hk-surface-muted);
  color: var(--hk-text-muted);
  cursor: default;
}

.hk-email-tpl-list__trigger-count {
  font-variant-numeric: tabular-nums;
}

.hk-email-tpl-list__trigger-label {
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hk-email-tpl-list__trigger-caret {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.hk-email-tpl-list__trigger-caret.is-open {
  transform: rotate(180deg);
}

.hk-email-tpl-list__cell--status {
  display: flex;
}

.hk-email-tpl-list__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hk-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hk-email-tpl-list__toggle-label {
  color: var(--hk-text-muted);
  transition: color 0.15s ease;
}

.hk-email-tpl-list__toggle-label.is-active {
  color: var(--hk-text-primary);
}

.hk-email-tpl-list__toggle-spinner {
  width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hk-brand-primary);
}

.hk-email-tpl-list__toggle-switch {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.hk-email-tpl-list__toggle-switch.is-on {
  background: var(--hk-brand-primary);
  border-color: var(--hk-brand-primary);
}

.hk-email-tpl-list__toggle-thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  transition: left 0.2s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.hk-email-tpl-list__toggle-switch.is-on .hk-email-tpl-list__toggle-thumb {
  left: 16px;
}

.hk-email-tpl-list__cell--actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.hk-email-tpl-list__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--hk-border);
  color: var(--hk-brand-primary);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hk-email-tpl-list__icon-btn:hover {
  background: var(--hk-brand-primary-light);
  border-color: rgba(37, 121, 255, 0.25);
}

.hk-email-tpl-list__icon-btn--accent {
  color: #f59e0b;
}

.hk-email-tpl-list__icon-btn--accent:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.hk-email-tpl-list__trigger-detail {
  padding: 0 16px 16px;
  background: var(--hk-surface-muted);
  border-bottom: 1px solid var(--hk-border);
}

.hk-email-tpl-list__trigger-detail:last-child {
  border-bottom: none;
}

@media (max-width: 1280px) {
  .hk-email-tpl-list__header,
  .hk-email-tpl-list__row {
    grid-template-columns: 48px minmax(200px, 2.4fr) minmax(140px, 1.2fr) 110px 120px 100px;
  }

  .hk-email-tpl-list__header .hk-email-tpl-list__cell--date:nth-of-type(4),
  .hk-email-tpl-list__row .hk-email-tpl-list__cell--date:nth-of-type(4) {
    display: none;
  }
}

@media (max-width: 980px) {
  .hk-email-tpl-list__header,
  .hk-email-tpl-list__row {
    grid-template-columns: 44px minmax(180px, 2.6fr) 100px 110px 90px;
  }

  .hk-email-tpl-list__header .hk-email-tpl-list__cell--date,
  .hk-email-tpl-list__row .hk-email-tpl-list__cell--date {
    display: none;
  }
}

/* ============================================================ */
/* Contact detail page (mirrors .client-page-header pattern)    */
/* ============================================================ */

.hk-module .contact_view_container {
  font-family: var(--hk-font);
}

.hk-module .contact-page-header--with-avatar .client-page-header__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.hk-module .contact-page-header__avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--hk-brand-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  user-select: none;
}

.hk-module .contact-page-header__title-placeholder {
  font-style: italic;
  font-weight: 500;
  color: var(--hk-text-muted);
}

.hk-module .contact-page-header__category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--hk-brand-primary-light, #e8f1ff);
  border: 1px solid rgba(37, 121, 255, 0.25);
  border-radius: 20px;
  font-size: 12px;
  color: var(--hk-brand-primary, #2579ff);
  font-weight: 600;
  line-height: 1.4;
}

.hk-module .contact-page-header__category-icon {
  flex-shrink: 0;
  color: var(--hk-brand-primary);
}

.hk-module .contact-page-header__category-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-module .contact-page-header__actions {
  gap: 8px;
}

.hk-module .hk-header-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  font-family: var(--hk-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--hk-brand-primary);
  background: var(--hk-surface);
  border: 1px solid var(--hk-brand-primary);
  border-radius: var(--hk-radius-md);
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.hk-module .hk-header-action:hover {
  color: #fff;
  background: var(--hk-brand-primary);
  box-shadow: 0 2px 8px rgba(37, 121, 255, 0.25);
  text-decoration: none !important;
}

.hk-module .hk-header-action--close {
  color: var(--hk-text-secondary);
  border-color: var(--hk-border-strong);
}

.hk-module .hk-header-action--close:hover {
  color: var(--hk-text-primary);
  background: var(--hk-surface-muted);
  border-color: var(--hk-text-secondary);
  box-shadow: none;
}

.hk-module .hk-header-action__label {
  letter-spacing: 0.01em;
}

.hk-module .contact-page-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow-y: hidden;
  padding: 10px 12px 0;
  min-height: 0;
}

@media (max-width: 768px) {
  .hk-module .contact-page-header__avatar {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .hk-module .hk-header-action__label {
    display: none;
  }

  .hk-module .hk-header-action {
    width: 34px;
    padding: 0;
    justify-content: center;
  }
}
