@charset "UTF-8";
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:            #F4F2EC;   /* папір */
  --surface:       #ffffff;
  --border:        #E2E0D8;   /* лінії */
  --text:          #161A22;   /* ink графіт */
  --muted:         #5A6270;   /* м'який текст */
  --accent:        #157A63;   /* смарагд — головний акцент */
  --accent-h:      #2FA98A;   /* hover акценту */
  --accent-bg:     #E8F5EF;   /* світлий фон акценту */
  --success:       #157A63;   /* alias до accent */
  --success-light: #2FA98A;
  --info:          #3FA3EA;   /* блакитний — вторинний акцент */
  --info-h:        #7CC4F0;
  --info-bg:       #E3F1FC;
  --ink-2:         #2B3340;   /* темні поверхні */
  --danger:        #e24b4a;
  --sidebar-w:     220px;
}

body { font-family: system-ui, -apple-system, sans-serif; font-size: 15px;
       background: var(--bg); color: var(--text); line-height: 1.6; }

/* ---- LAYOUT ---- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); background: var(--surface);
  border-right: 1px solid var(--border); display: flex;
  flex-direction: column; padding: 20px 0; position: fixed;
  top: 0; left: 0; height: 100vh;
}
.sidebar-logo { font-weight: 600; font-size: 18px; padding: 0 20px 20px; }

.sidebar-nav { flex: 1; }
.nav-item {
  display: block; padding: 10px 20px; color: var(--muted);
  text-decoration: none; border-radius: 0;
  transition: background .15s, color .15s;
}
.nav-item:hover, .nav-item.active {
  background: var(--bg); color: var(--text);
}
.nav-item.active { font-weight: 500; }

.sidebar-footer { padding: 20px; border-top: 1px solid var(--border); font-size: 13px; }
.tenant-name { display: block; color: var(--muted); margin-bottom: 6px; }
.logout-link { color: var(--danger); text-decoration: none; font-size: 13px; }

.main { margin-left: var(--sidebar-w); flex: 1; padding: 32px; }
.page-header h1 { font-size: 22px; font-weight: 500; margin-bottom: 24px; }

/* ---- CARDS ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px;
}
.card h3 { font-size: 16px; font-weight: 500; margin-bottom: 16px; }

/* ---- STATS ---- */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px;
}
.stat-value { font-size: 32px; font-weight: 600; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---- TABLE ---- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 8px 12px; color: var(--muted);
            border-bottom: 1px solid var(--border); font-weight: 500; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg); }

/* ---- FORMS ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500;
               margin-bottom: 6px; color: var(--muted); }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 15px; background: var(--surface);
  color: var(--text); transition: border-color .15s;
}
input:focus { outline: none; border-color: var(--accent); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 8px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  border: none; text-decoration: none; transition: background .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }
.btn-full { width: 100%; text-align: center; }

/* ---- ALERTS ---- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---- LOGIN ---- */
.login-body { display: flex; align-items: center;
              justify-content: center; min-height: 100vh; }
.login-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 40px; width: 100%; max-width: 400px;
}
.login-box h2 { font-size: 22px; font-weight: 600; margin-bottom: 28px; text-align: center; }

/* ---- NAV SECTION ---- */
.nav-section {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); padding: 16px 20px 6px;
}
.nav-sub { padding-left: 32px; font-size: 14px; }

/* ---- DANGER BUTTON SMALL ---- */
.btn-danger-sm {
  display: inline-block; padding: 5px 12px; border-radius: 6px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid #fecaca; background: #fef2f2;
  color: #991b1b; transition: background .15s;
}
.btn-danger-sm:hover { background: #fee2e2; }

/* ---- ALERT INFO ---- */
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ========================================
   CHAT LAYOUT
   ======================================== */
.page-content:has(.chat-layout) { padding: 0; }

.chat-layout {
  display: flex;
  height: calc(100vh - 89px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

/* --- Список чатів --- */
.chat-list {
  width: 300px; min-width: 300px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.chat-list-header { padding: 12px; border-bottom: 1px solid var(--border); }
.chat-search {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; background: var(--bg);
}
.chat-list-items { flex: 1; overflow-y: auto; }
.chat-empty-list { padding: 24px; color: var(--muted); font-size: 14px; text-align: center; }

.chat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.chat-item:hover { background: var(--bg); }
.chat-item.active { background: var(--accent-bg); }

.chat-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; color: #fff;
  flex-shrink: 0;
}
.chat-item-info { flex: 1; min-width: 0; }
.chat-item-top { display: flex; justify-content: space-between; align-items: center; }
.chat-item-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-time { font-size: 11px; color: var(--muted); flex-shrink: 0; margin-left: 8px; }
.chat-item-preview { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* --- Вікно чату --- */
.chat-window { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.chat-placeholder {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--muted); gap: 8px;
}
.chat-placeholder div { font-size: 48px; }
.chat-placeholder p { font-size: 15px; }

.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.chat-header-name { font-size: 15px; font-weight: 500; }
.chat-header-sub  { font-size: 12px; color: var(--muted); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg);
}
.chat-no-messages { text-align: center; color: var(--muted); font-size: 14px; margin: auto; }

.chat-msg { display: flex; flex-direction: column; max-width: 68%; }
.chat-msg-in  { align-self: flex-start; align-items: flex-start; }
.chat-msg-out { align-self: flex-end; align-items: flex-end; }

.chat-bubble {
  padding: 9px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.5; word-break: break-word;
}
.chat-msg-in  .chat-bubble { background: var(--accent); color: #fff; border-radius: 14px 14px 14px 2px; }
.chat-msg-out .chat-bubble { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 14px 14px 2px 14px; }
.chat-msg-time { font-size: 11px; color: var(--muted); margin-top: 3px; padding: 0 4px; }
.chat-msg-in .chat-msg-time { color: rgba(255,255,255,.7); }

.chat-form {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--border);
  background: var(--surface);
}
.chat-input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 20px; font-size: 14px; resize: none;
  font-family: inherit; line-height: 1.4; max-height: 120px;
  transition: border-color .15s;
}
.chat-input:focus { outline: none; border-color: var(--accent); }
.chat-send-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none;
  font-size: 16px; cursor: pointer; flex-shrink: 0;
  transition: background .15s;
}
.chat-send-btn:hover { background: var(--accent-h); }

/* ---- CHAT MEDIA ---- */
.chat-media-photo {
  max-width: 260px; max-height: 260px; border-radius: 10px;
  display: block; cursor: zoom-in; object-fit: cover;
}
.chat-media-video {
  max-width: 280px; border-radius: 10px; display: block;
}
.chat-media-audio {
  width: 240px; height: 36px;
}
.chat-doc-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; background: rgba(255,255,255,.15);
  border-radius: 8px; text-decoration: none;
  color: inherit; font-size: 14px;
  border: 1px solid rgba(255,255,255,.2);
}
.chat-msg-in .chat-doc-link {
  background: var(--bg); border-color: var(--border); color: var(--accent);
}

/* ---- LOCATION ---- */
.chat-location {
  display: block; text-decoration: none; color: inherit;
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
}
.chat-msg-in .chat-location { border-color: var(--border); }

.chat-location-map {
  background: #e8f4e8; height: 80px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.chat-location-coords { font-size: 12px; opacity: .7; padding: 6px 10px 2px; }
.chat-location-link   { font-size: 13px; font-weight: 500; padding: 2px 10px 8px; color: var(--accent); }
.chat-msg-in .chat-location-link { color: rgba(255,255,255,.9); }

/* ---- SHARED CONTACT ---- */
.chat-contact-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px;
}
.chat-contact-icon  { font-size: 28px; }
.chat-contact-name  { font-weight: 500; font-size: 14px; }
.chat-contact-phone { font-size: 13px; color: var(--accent); text-decoration: none; }
.chat-msg-in .chat-contact-phone { color: rgba(255,255,255,.85); }

/* ---- CONTACT PANEL ---- */
.chat-layout { position: relative; }

.contact-panel {
  width: 0; min-width: 0; overflow: hidden;
  border-left: 0 solid var(--border);
  transition: width .25s ease, min-width .25s ease, border-left-width .25s ease;
  background: var(--surface); display: flex; flex-direction: column;
}
.contact-panel.open {
  width: 350px; min-width: 350px;
  border-left-width: 1px;
}
.contact-panel-inner { width: 350px; padding: 20px; overflow-y: auto; flex: 1; }

.contact-panel-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #fff;
  margin: 0 auto 12px; position: relative;
}
.contact-panel-avatar img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; position: absolute; top: 0; left: 0;
}
.contact-panel-name {
  font-size: 16px; font-weight: 600; text-align: center; margin-bottom: 4px;
}
.contact-panel-username {
  font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 20px;
}
.contact-panel-section {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px;
}
.contact-panel-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--border);
}
.contact-panel-row:last-child { border-bottom: none; }
.contact-panel-label { color: var(--muted); flex-shrink: 0; margin-right: 8px; }
.contact-panel-value { text-align: right; word-break: break-all; }

.btn-icon {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 16px;
  transition: background .15s;
}
.btn-icon:hover { background: var(--bg); }
.btn-icon.active { background: var(--accent-bg); border-color: var(--accent); }

/* Меню дій у рядку - ОДНА точка на всю платформу (06.09). До неї було шість
   приватних редакцій одного вигляду: .btn-icon + inline-скидання рамки (bots),
   дві копії .icon-btn (users, tags), .lp-kebab (privacy), .ws-menu-btn
   (integrations), .pl-more (pipelines). Символ - завжди ⋮ (&#8942;). */
.nk-kebab {
  border: none; background: none; cursor: pointer;
  padding: 4px 8px; font-size: 18px; line-height: 1;
  color: var(--muted); border-radius: 6px;
  transition: background .15s, color .15s;
}
.nk-kebab:hover { background: var(--bg); color: var(--ink, #161A22); }

.badge-premium {
  display: inline-block; font-size: 11px; padding: 2px 6px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff; border-radius: 4px; font-weight: 600;
}

/* ---- AVATAR FIX ---- */
.chat-avatar, .contact-panel-avatar {
  position: relative; display: flex;
  align-items: center; justify-content: center;
  border-radius: 50%; flex-shrink: 0;
}
.chat-avatar img, .contact-panel-avatar img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover;
}
.avatar-initials { position: relative; z-index: 1; }

/* ---- EDITABLE FIELD ---- */
.editable-field { margin-bottom: 4px; }
.editable-field label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-bottom: 4px;
}
.editable-field input {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 7px; font-size: 13px; background: var(--bg);
  color: var(--text); transition: border-color .15s;
}
.editable-field input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.btn-save-fields {
  width: 100%; margin-top: 12px; padding: 8px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 8px; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background .15s;
}
.btn-save-fields:hover { background: var(--accent-h); }
.save-status { font-size: 12px; text-align: center; margin-top: 6px; color: var(--muted); min-height: 16px; }

/* ---- REMOVE PAGE HEADER ---- */
.page-header { display: none; }
.page-content { padding: 0; }
.main { padding: 24px 32px; }

/* ========================================
   COLLAPSIBLE SIDEBAR
   ======================================== */
:root { --sidebar-collapsed-w: 60px; }

.sidebar-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px 16px; gap: 8px;
}
.sidebar-logo-icon { display: none; font-weight: 700; font-size: 18px; }

.sidebar-toggle {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; font-size: 13px; display: flex;
  align-items: center; justify-content: center;
  color: var(--muted); transition: background .15s;
}
.sidebar-toggle:hover { background: var(--border); }

.nav-icon  { font-size: 16px; flex-shrink: 0; min-width: 20px; text-align: center; }
.nav-label { transition: opacity .2s; white-space: nowrap; overflow: hidden; }
.nav-divider { height: 1px; background: var(--border); margin: 6px 12px; }

/* Collapsed state */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-w);
  min-width: var(--sidebar-collapsed-w);
}
.sidebar.collapsed .sidebar-logo    { display: none; }
.sidebar.collapsed .sidebar-logo-icon { display: block; }
.sidebar.collapsed .nav-label       { display: none; }
.sidebar.collapsed .nav-section     { display: none; }
.sidebar.collapsed .nav-item        { padding: 10px 0; justify-content: center; }
.sidebar.collapsed .nav-sub         { padding-left: 0; }
.sidebar.collapsed .tenant-name     { display: none; }
.sidebar.collapsed .logout-link     { justify-content: center; }

.sidebar-collapsed .main { margin-left: var(--sidebar-collapsed-w); }

.nav-item { display: flex; align-items: center; gap: 10px; }
.sidebar-footer { display: flex; flex-direction: column; gap: 4px; }
.logout-link    { display: flex; align-items: center; gap: 8px; }

/* Sidebar transition */
.sidebar {
  transition: width .2s ease, min-width .2s ease;
}
.main { transition: margin-left .2s ease; }

/* ========================================
   MOBILE
   ======================================== */
.mobile-menu-btn {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 200;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 18px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 99;
}

@media (max-width: 768px) {
  .mobile-menu-btn  { display: flex; align-items: center; justify-content: center; }
  .mobile-overlay   { display: block; }
  .sidebar-toggle   { display: none; }

  .sidebar {
    position: fixed; left: -240px; top: 0; height: 100vh;
    z-index: 100; width: var(--sidebar-w) !important;
    min-width: var(--sidebar-w) !important;
    box-shadow: 4px 0 20px rgba(0,0,0,.12);
    transition: left .25s ease;
  }
  .sidebar.mobile-open { left: 0; }
  .sidebar .nav-label  { display: block !important; }
  .sidebar .nav-item   { padding: 10px 20px !important; justify-content: flex-start !important; }
  .sidebar .nav-section{ display: block !important; }

  .main {
    /* 05.09: реальний сайдбар - .sb (sidebar.css), на телефоні лишається видимим 56px; правила .sidebar нижче - мертві */
    margin-left: var(--sb-w-col) !important;
    padding: 12px 10px 16px;
  }

  /* Chat mobile */
  .chat-layout { flex-direction: column; height: auto; min-height: calc(100vh - 76px); }
  .chat-list   { width: 100% !important; max-height: 240px; border-right: none; border-bottom: 1px solid var(--border); }
  .chat-window { flex: 1; }
  .contact-panel.open { width: 100% !important; min-width: 100% !important; border-left: none; border-top: 1px solid var(--border); }

  /* Stats grid */
  .stats-grid { grid-template-columns: 1fr; }

  /* Tables scroll */
  .card { overflow-x: auto; }
}

@media (max-width: 480px) {
  .main { padding: 56px 12px 12px; }
  .chat-list { max-height: 200px; }
}

/* ========================================
   SIDEBAR TOGGLE — Claude style
   ======================================== */
.sidebar-top {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 12px 16px; gap: 8px;
}
.sidebar.collapsed .sidebar-top {
  justify-content: center;
  padding: 0 0 16px;
}

.sidebar-toggle {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  border: 1px solid var(--border); background: transparent;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--muted);
  transition: background .15s, color .15s;
}
.sidebar-toggle:hover { background: var(--bg); color: var(--text); }
.sidebar-toggle svg   { display: block; }

/* Mobile: collapsed by default, no overlay needed */
@media (max-width: 768px) {
  .sidebar {
    width: var(--sidebar-collapsed-w) !important;
    min-width: var(--sidebar-collapsed-w) !important;
  }
  .sidebar-collapsed .main,
  .main { margin-left: var(--sidebar-collapsed-w); }

  .sidebar:not(.collapsed) {
    width: var(--sidebar-w) !important;
    min-width: var(--sidebar-w) !important;
    position: fixed; z-index: 100; height: 100vh;
    box-shadow: 4px 0 20px rgba(0,0,0,.12);
  }

  .main { padding: 24px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .chat-layout { flex-direction: column; height: auto; }
  .chat-list   { width: 100% !important; max-height: 220px; border-right: none; border-bottom: 1px solid var(--border); }
  .contact-panel.open { width: 100% !important; min-width: 100% !important; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main { padding: 16px 12px; }
}

/* ========================================
   KANBAN BOARD
   ======================================== */
.kanban-board {
  display: flex; gap: 14px; overflow-x: auto;
  padding-bottom: 16px; align-items: flex-start;
  min-height: calc(100vh - 140px);
}
.kanban-col {
  min-width: 240px; max-width: 240px;
  background: var(--bg); border-radius: 10px;
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--border);
}
.kanban-col-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.kanban-dot    { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.kanban-col-name  { font-size: 13px; font-weight: 600; flex: 1; }
.kanban-col-count {
  font-size: 12px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 1px 7px;
}

.kanban-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.kanban-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px; cursor: grab;
  transition: box-shadow .15s, transform .15s;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card:hover  { box-shadow: 0 2px 8px rgba(0,0,0,.08); transform: translateY(-1px); }
.kanban-card-name    { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.kanban-card-contact { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kanban-card-amount  { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 4px; }

.kanban-add-btn {
  width: 100%; padding: 8px; border: 1px dashed var(--border);
  border-radius: 8px; background: transparent; cursor: pointer;
  font-size: 13px; color: var(--muted); text-align: center;
  transition: background .15s, color .15s;
}
.kanban-add-btn:hover { background: var(--surface); color: var(--text); }

@media (max-width: 768px) {
  .kanban-board { flex-direction: column; }
  .kanban-col   { min-width: 100%; max-width: 100%; }
}

/* Telegram Login Widget iframe — прибрати чорний фон у dark-режимі Safari/Mac */
iframe[id^="telegram-login-"]{
  color-scheme: light only;
  background: transparent !important;
  border-radius: 10px;
}


/* Контекстна іконка «?» біля лейбла поля - лінк у довідковий центр (nk_help_hint) */
.nk-hh{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;
  border:1px solid #CDE6F8;background:#E3F1FC;color:#2B7FC4;font-size:11px;font-weight:700;line-height:1;
  text-decoration:none;vertical-align:middle;position:relative;top:-1px;margin-left:6px;flex-shrink:0;
  transition:background .15s,border-color .15s,color .15s}
.nk-hh:hover{background:#3FA3EA;border-color:#3FA3EA;color:#fff}
.nk-hh:focus-visible{outline:2px solid #3FA3EA;outline-offset:2px}

/* Пілюля угоди в блоці задач (дзеркало .contact-tag-pill, зелена схема) */
.nk-deal-pill{display:inline-flex;align-items:center;gap:3px;margin-top:3px;max-width:100%;overflow:hidden;text-overflow:ellipsis;padding:2px 7px;border-radius:5px;font-size:11px;font-weight:500;font-family:monospace;letter-spacing:.2px;white-space:nowrap;background:#EAF5F1;border:1px solid #B9DCD0;color:#157A63;text-decoration:none}
.nk-deal-pill:hover{background:#DCEDE6}


/* ActionEditor (editor/blocks/actions.js.php) - спільні стилі.
   Перенесено з app/views/settings/pipelines.php 31.08.2026: редактор дій
   переюзається поза редактором нод (воронки продажів, хуки офера), тому
   його класи мусять жити в глобальному app.css, а не в одній в'юсі. */
  .ae-card{background:#f9f9f8;border:1px solid #e5e5e3;border-radius:9px;margin-bottom:8px;overflow:hidden}
  .ae-card__head{display:flex;align-items:center;gap:8px;padding:9px 12px;background:#fff;border-bottom:1px solid #f0f0ee}
  .ae-card__icon{width:22px;height:22px;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
  .ae-card__label{flex:1;font-size:13px;font-weight:500;color:#1c1c1a}
  .ae-card__del{width:24px;height:24px;border:none;background:none;cursor:pointer;color:#aaa;display:flex;align-items:center;justify-content:center;border-radius:5px;padding:0}
  .ae-card__del:hover{background:#fee2e2;color:#e24b4a}
  .ae-card__params{padding:10px 12px}
  .ae-row{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}
  .ae-row:last-child{margin-bottom:0}
  .ae-label{font-size:11px;color:#888;font-weight:500}
  .ae-select,.ae-input,.ae-textarea{width:100%;padding:7px 9px;border:1px solid #e5e5e3;border-radius:7px;font-size:13px;color:#1c1c1a;background:#fff;box-sizing:border-box;outline:none}
  .ae-select:focus,.ae-input:focus,.ae-textarea:focus{border-color:#3FA3EA}
  .ae-input--mono{font-family:monospace;font-size:12px}
  .ae-textarea{resize:vertical;min-height:70px}
  .ae-hint{font-size:12px;color:#aaa;font-style:italic}
  .ae-toggle-row{display:flex;align-items:center;gap:8px;font-size:12.5px;cursor:pointer;color:#1c1c1a}
  .ae-tgl{position:relative;display:inline-block;width:36px;height:20px;flex-shrink:0}
  .ae-tgl input{opacity:0;width:0;height:0}
  .ae-tgl-track{position:absolute;inset:0;border-radius:10px;background:#ccc;transition:.2s}
  .ae-tgl input:checked + .ae-tgl-track{background:#157A63}
  .ae-tgl-dot{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:.2s}
  .ae-tgl input:checked + .ae-tgl-track .ae-tgl-dot{left:18px}
  .ae-add-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px dashed #cfcfca;border-radius:8px;background:#fff;color:#666;font-size:13px;cursor:pointer;width:100%;justify-content:center}
  .ae-add-btn:hover{border-color:#3FA3EA;color:#3FA3EA}

  /* ── Вкладки сторінки (еталон /settings/users, 05.09) ── */
  .ws-tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:16px;flex-wrap:wrap}
  .ws-tab{padding:8px 14px;font-size:13px;flex-shrink:0;white-space:nowrap;color:var(--muted);text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px}
  .ws-tab.on{color:var(--text);border-bottom-color:var(--accent);font-weight:500}
  /* border:0 знімав і ШИРИНУ рамки, а .ws-tab.on задає лише її колір - у вкладок-кнопок
     підкреслення активної було невидиме, у вкладок-посилань працювало (06.09). */
  button.ws-tab{border:0;border-bottom:2px solid transparent;background:transparent;font-family:inherit;line-height:1.4;cursor:pointer}
