@layer app {
  th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
  th.sortable:hover { color: var(--gray-800); }
  th.sortable .sort-arrow { display: inline-block; margin-left: .3rem; font-size: .7rem; opacity: .35; }
  th.sortable.asc .sort-arrow::after { content: '▲'; opacity: 1; }
  th.sortable.desc .sort-arrow::after { content: '▼'; opacity: 1; }
  th.sortable:not(.asc):not(.desc) .sort-arrow::after { content: '⇅'; }

  .alpha-sep td { padding: .3rem 0 .1rem; border: none !important; }
  .alpha-sep .alpha-label { display: flex; align-items: center; gap: .6rem; font-size: .7rem; font-weight: 700; color: var(--gray-400); letter-spacing: .08em; text-transform: uppercase; }
  .alpha-sep .alpha-label::after { content: ''; flex: 1; height: 1px; background: var(--gray-100); }

  #alpha-nav { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 100; display: flex; flex-direction: column; gap: 1px; }
  #alpha-nav a { display: block; width: 18px; text-align: center; font-size: .7rem; font-weight: 600; color: var(--gray-300); line-height: 1.6; cursor: pointer; border-radius: 3px; text-decoration: none; transition: color .1s, background .1s; }
  #alpha-nav a.active { color: var(--blue); background: var(--blue-light); }
  #alpha-nav a:hover { color: var(--gray-700); }

  .ctx-menu { position: fixed; z-index: 9999; background:var(--surface); border: 1.5px solid var(--gray-200); border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,.12); min-width: 220px; overflow: hidden; display: none; }
  .ctx-menu.open { display: block; }
  .ctx-menu-item { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; font-size: .875rem; font-weight: 500; cursor: pointer; transition: background .1s; }
  .ctx-menu-item:hover { background: var(--gray-50); }
  .ctx-menu-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; color: var(--gray-500); }
  @media (max-width: 767px) {
    .contacts-table > tbody > tr:not(.mt-full) { padding-right: 2rem; grid-template-columns: 1fr auto; grid-template-areas: "name type" "city city" "contact contact"; }
    .contacts-table .k-name { grid-area: name; }
    .contacts-table .k-type { grid-area: type; justify-self: end; }
    .contacts-table .k-city { grid-area: city; font-size: .8rem; color: var(--gray-500); }
    .contacts-table .k-contact { grid-area: contact; }
  }
}
