﻿/* â”€â”€â”€ Design tokens â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
  --ink:      #0D1B2A;
  --paper:    #F4F9FC;
  --bone:     #E8F4FA;
  --sun:      #59CDF5;
  --red:      #B11119;
  --steel:    #5A7080;
  --hairline: #CCE4F0;
  --white:    #FFFFFF;
  --sidebar-w: 224px;
  --r:  8px;
  --r-lg: 12px;

  --stage-new:      #3B82F6;
  --stage-work:     #8B5CF6;
  --stage-meet:     #F59E0B;
  --stage-estimate: #14B8A6;
  --stage-deal:     #22C55E;
  --stage-reject:   #9CA3AF;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* â”€â”€â”€ Login â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  background-image: radial-gradient(ellipse at 60% 40%, rgba(89,205,245,0.07) 0%, transparent 60%);
}
.login-card {
  background: var(--paper);
  border-radius: 16px;
  padding: 44px 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.login-logo-img {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 12px;
}
.login-logo {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink);
  margin-bottom: 2px;
}
.login-logo span { color: var(--sun); }
.login-sub { color: var(--steel); font-size: 13px; margin-bottom: 36px; }

/* â”€â”€â”€ App layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
}
.sidebar-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-logo-img { width: 120px; height: auto; display: block; }

/* Bell */
.notif-bell {
  position: relative; background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.45); padding: 6px; border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.notif-bell:hover { color: #fff; background: rgba(255,255,255,0.08); }
.notif-bell svg { width: 20px; height: 20px; display: block; }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink);
}

/* Notification panel */
.notif-backdrop { position: fixed; inset: 0; z-index: 199; }
.notif-panel {
  position: fixed; top: 0; left: var(--sidebar-w); bottom: 0;
  width: min(360px, 100vw); background: var(--white);
  border-right: 1.5px solid var(--hairline);
  box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  z-index: 200; display: flex; flex-direction: column;
  transform: translateX(-8px); opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
  pointer-events: none;
}
.notif-panel.open { transform: translateX(0); opacity: 1; pointer-events: all; }
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 14px; border-bottom: 1.5px solid var(--hairline);
  font-weight: 700; font-size: 15px;
}
.notif-list { flex: 1; overflow-y: auto; }
.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-bottom: 1px solid var(--hairline);
  cursor: pointer; transition: background 0.1s;
}
.notif-item:hover { background: var(--paper); }
.notif-item.unread { background: #FFFBEB; }
.notif-item.unread:hover { background: #FFF3C4; }
.notif-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.notif-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.notif-body { font-size: 12px; color: var(--steel); line-height: 1.4; }
.notif-time { font-size: 11px; color: #9CA3AF; margin-top: 3px; }
.notif-empty { padding: 40px 20px; text-align: center; color: var(--steel); font-size: 14px; }

/* Toggle switch */
.toggle { display: inline-flex; cursor: pointer; }
.toggle input { display: none; }
.toggle-track {
  width: 40px; height: 22px; background: var(--hairline); border-radius: 11px;
  position: relative; transition: background 0.2s;
}
.toggle-track::after {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-track { background: #22C55E; }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); }

/* Notification settings rows */
.notif-setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--hairline); gap: 16px;
}
.notif-setting-row:last-child { border-bottom: none; }
.notif-setting-label { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.notif-setting-desc { font-size: 12px; color: var(--steel); }
.ns-number {
  width: 44px; padding: 2px 6px; border: 1.5px solid var(--hairline);
  border-radius: 6px; font-size: 13px; text-align: center;
  display: inline-block; margin: 0 2px;
}
.sidebar-logo {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--sun);
}
.sidebar-logo-dot { color: rgba(255,255,255,0.3); }

.sidebar-nav {
  list-style: none;
  padding: 10px 0;
  flex: 1;
  overflow-y: auto;
}
.sidebar-nav li { margin: 2px 10px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  border-radius: var(--r);
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  letter-spacing: 0.01em;
}
.nav-link svg {
  width: 17px; height: 17px;
  stroke: currentColor; fill: none; stroke-width: 2;
  flex-shrink: 0;
}
.nav-link:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.9); }
.nav-link.active {
  background: var(--sun);
  color: var(--ink);
  font-weight: 700;
}
.nav-link.active svg { stroke: var(--ink); }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.user-chip {
  font-size: 12.5px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
  line-height: 1.4;
}
.user-chip strong { color: rgba(255,255,255,0.9); font-weight: 600; display: block; }
.btn-logout {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.45);
  padding: 7px 14px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 12.5px;
  width: 100%;
  transition: all 0.15s;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
}

/* â”€â”€â”€ Bottom nav â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--ink);
  padding: 6px 0 env(safe-area-inset-bottom);
  z-index: 200;
  justify-content: space-around;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.bnav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  font-size: 10px;
  padding: 4px 14px;
  border-radius: 6px;
  transition: color 0.12s;
}
.bnav-link svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.bnav-link.active { color: var(--sun); }

/* â”€â”€â”€ Views â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.view { display: none; padding: 28px 28px; }
.view.active { display: block; }
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.view-header h1 { font-size: 21px; font-weight: 700; }

/* â”€â”€â”€ Kanban â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kanban {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 20px;
  align-items: flex-start;
  min-height: calc(100vh - 120px);
}
.kanban::-webkit-scrollbar { height: 6px; }
.kanban::-webkit-scrollbar-track { background: transparent; }
.kanban::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 3px; }

.kanban-col {
  background: var(--bone);
  border-radius: var(--r-lg);
  padding: 0;
  min-width: 238px;
  width: 238px;
  flex-shrink: 0;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.kanban-col.drag-over {
  box-shadow: 0 0 0 2px var(--sun);
  background: #F0EAD6;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 11px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: relative;
}
.kanban-col-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--stage-color, var(--steel));
}
.kanban-col-title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.kanban-count {
  background: rgba(0,0,0,0.10);
  color: var(--ink);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
}

.kanban-cards {
  display: grid;
  grid-template-columns: repeat(var(--card-cols, 1), 1fr);
  gap: 8px;
  padding: 10px;
  min-height: 60px;
  align-content: start;
}

/* â”€â”€â”€ Client card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.client-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 0;
  cursor: pointer;
  border: 1.5px solid var(--hairline);
  transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s;
  user-select: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.client-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.10); transform: translateY(-1px); }
.client-card.dragging { opacity: 0.35; transform: scale(0.96); box-shadow: none !important; }
.client-card.card-overdue { border-left: 3px solid var(--red) !important; }
.client-card.card-today   { border-left: 3px solid var(--sun) !important; }
.card-drag-bar {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 28px;
  background: rgba(0,0,0,0.03);
  border-left: 1px solid rgba(0,0,0,0.07);
  border-radius: 0 var(--r) var(--r) 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.client-card:hover .card-drag-bar { opacity: 1; }
.card-drag-handle {
  width: 100%; height: 100%;
  cursor: grab;
  touch-action: none;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
  border-radius: 0 var(--r) var(--r) 0;
}
.card-drag-handle:hover { background: rgba(0,0,0,0.07); }
.card-drag-handle:active { cursor: grabbing; background: rgba(0,0,0,0.14); }
.drag-dots { pointer-events: none; display: block; }
.card-body { padding: 11px 36px 11px 12px; flex: 1; min-width: 0; }
.drag-ghost {
  pointer-events: none; z-index: 9999;
  box-shadow: 0 16px 48px rgba(0,0,0,0.28) !important;
  border-radius: var(--r) !important;
  transition: transform 0.1s;
}
.drag-indicator {
  height: 3px; border-radius: 2px; background: var(--sun);
  position: fixed; z-index: 9998; pointer-events: none;
  box-shadow: 0 0 6px var(--sun);
  display: none;
}
.drag-stage-hint {
  background: var(--ink); color: #fff; border-radius: 20px;
  padding: 4px 14px; font-size: 13px; font-weight: 700; white-space: nowrap;
  pointer-events: none;
}

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
.card-name { font-weight: 700; font-size: 13.5px; line-height: 1.3; flex: 1; }
.card-tasks {
  background: var(--sun); color: var(--ink);
  border-radius: 10px; padding: 1px 6px;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.card-phone {
  display: inline-block; font-size: 12px; color: var(--steel);
  margin-bottom: 9px; text-decoration: none;
  font-variant-numeric: tabular-nums;
  padding: 2px 0;
}
.card-phone:hover { color: var(--ink); text-decoration: underline; }
.card-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; gap: 6px;
}
.card-size { font-size: 11px; color: var(--steel); }
.card-days {
  font-size: 10px; color: var(--steel); background: var(--bone);
  padding: 1px 6px; border-radius: 10px; white-space: nowrap;
}
.card-days.days-stale { background: #FFE8E8; color: var(--red); }
.card-manager { font-size: 11px; color: var(--steel); margin-top: 6px; }

/* â”€â”€â”€ Kanban filter bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kanban-filters {
  display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center;
}
.filter-sm { padding: 6px 12px; font-size: 12.5px; }
/* â”€â”€â”€ Pipeline tabs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pipeline-tabs { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pipeline-tab {
  padding: 6px 14px; font-size: 13px; font-weight: 600; border: 1.5px solid var(--hairline);
  border-radius: 20px; background: var(--white); color: var(--steel); cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.pipeline-tab:hover { border-color: var(--ink); color: var(--ink); }
.pipeline-tab.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pipeline-tab-add {
  padding: 5px 10px; font-size: 13px; border: 1.5px dashed var(--hairline);
  border-radius: 20px; background: transparent; color: var(--steel); cursor: pointer;
  transition: all 0.15s;
}
.pipeline-tab-add:hover { border-color: var(--ink); color: var(--ink); }

/* â”€â”€â”€ Pipeline editor â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pipeline-name-input {
  flex: 1; border: 1.5px solid var(--hairline); border-radius: var(--r); padding: 6px 10px;
  font-size: 15px; font-weight: 700; background: var(--paper); min-width: 0;
}
.pipeline-name-input:focus { outline: none; border-color: var(--sun); }
.stage-editor-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--hairline);
}
.stage-editor-row:last-child { border-bottom: none; }
.stage-color-dot {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.1s;
}
.stage-color-dot:hover { transform: scale(1.2); }
.stage-name-input {
  flex: 1; border: 1.5px solid transparent; border-radius: 6px; padding: 5px 8px;
  font-size: 13px; background: transparent;
}
.stage-name-input:focus { outline: none; border-color: var(--sun); background: var(--white); }
.stage-reject-btn {
  font-size: 11px; padding: 3px 8px; border-radius: 20px; border: 1.5px solid var(--hairline);
  background: transparent; cursor: pointer; color: var(--steel); white-space: nowrap;
}
.stage-reject-btn.active { background: #FEE2E2; border-color: var(--red); color: var(--red); }
.stage-move-btn { background: none; border: none; cursor: pointer; color: var(--steel); padding: 3px 4px; font-size: 14px; }
.stage-move-btn:hover { color: var(--ink); }
.stage-del-btn { background: none; border: none; cursor: pointer; color: var(--steel); padding: 3px 6px; font-size: 16px; }
.stage-del-btn:hover { color: var(--red); }
.pipeline-add-stage {
  display: flex; gap: 8px; align-items: center; padding: 14px 0 8px; flex-wrap: wrap;
}
.pipeline-add-stage input {
  flex: 1; min-width: 140px; border: 1.5px solid var(--hairline); border-radius: var(--r);
  padding: 7px 10px; font-size: 13px;
}
.pipeline-add-stage input:focus { outline: none; border-color: var(--sun); }
.color-swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.color-swatch {
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
  transition: transform 0.1s;
}
.color-swatch:hover { transform: scale(1.2); }
.color-swatch.selected { border-color: var(--ink); transform: scale(1.15); }

.period-pills { display: flex; gap: 3px; background: var(--bone); border-radius: 8px; padding: 3px; }
.period-pill {
  padding: 5px 13px; font-size: 12.5px; font-weight: 600; border: none; border-radius: 6px;
  background: transparent; color: var(--steel); cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.period-pill:hover { color: var(--ink); }
.period-pill.active { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.kfilter-divider { width: 1px; background: var(--hairline); align-self: stretch; margin: 0 2px; }

/* â”€â”€â”€ Nav badge â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.nav-badge {
  background: var(--red); color: #fff;
  border-radius: 10px; padding: 1px 6px;
  font-size: 10px; font-weight: 700; margin-left: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bone);
  color: var(--steel);
  letter-spacing: 0.01em;
}
.badge-source { background: #EEF2FF; color: #4B5EAA; }
.badge-source.src-avito   { background: #FFF0D6; color: #B45309; }
.badge-source.src-inst    { background: #FCE8F0; color: #9B1F5E; }
.badge-source.src-vk      { background: #E8F0FE; color: #1A56DB; }
.badge-source.src-wa      { background: #E7F9ED; color: #1A7A42; }
.badge-source.src-rec     { background: #F0FFF4; color: #166534; }
.badge-overdue { background: #FFE8E8; color: var(--red); }
.badge-today   { background: #FFF8D6; color: #856A00; }

/* â”€â”€â”€ Toolbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: 9px 14px;
  border: 1.5px solid var(--hairline);
  border-radius: var(--r);
  background: var(--white);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--sun); }
.filter-select {
  padding: 9px 14px;
  border: 1.5px solid var(--hairline);
  border-radius: var(--r);
  background: var(--white);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.filter-select:focus { border-color: var(--sun); }

/* â”€â”€â”€ Client table â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.client-table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--r-lg); border: 1.5px solid var(--hairline); }
.client-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.client-table th {
  text-align: left; padding: 11px 14px;
  border-bottom: 2px solid var(--bone);
  font-weight: 700; color: var(--steel);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap; background: var(--paper);
}
.client-table th:first-child { border-radius: var(--r-lg) 0 0 0; }
.client-table th:last-child  { border-radius: 0 var(--r-lg) 0 0; }
.client-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
.client-table tr:last-child td { border-bottom: none; }
.client-table tr:hover td { background: var(--paper); cursor: pointer; }

/* â”€â”€â”€ Tasks â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tasks-list { display: flex; flex-direction: column; gap: 8px; }
.task-row {
  background: var(--white);
  border: 1.5px solid var(--hairline);
  border-radius: var(--r);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  transition: box-shadow 0.12s;
}
.task-row:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.07); }
.task-check {
  width: 20px; height: 20px;
  border: 2px solid var(--hairline);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: transparent;
}
.task-check:hover { border-color: var(--sun); color: var(--ink); }
.task-text { flex: 1; font-size: 13.5px; }
.task-meta { font-size: 12px; color: var(--steel); text-align: right; white-space: nowrap; }
.task-client { font-size: 12px; color: #2563EB; font-weight: 600; }
.task-overdue { color: var(--red); font-weight: 600; }
.task-section-label { font-size: 11px; font-weight: 700; color: var(--steel); text-transform: uppercase; letter-spacing: 0.07em; padding: 6px 0 4px; }
.task-done { opacity: 0.55; }
.task-done .task-text { text-decoration: line-through; }
.task-check-undo { background: var(--bone); color: var(--steel) !important; border-color: var(--bone) !important; }
.call-row { cursor: pointer; }
.call-icon-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.call-log-form { border: 1.5px solid var(--hairline); border-radius: var(--r); padding: 12px; background: var(--paper); }
.call-log-form textarea { border: 1.5px solid var(--hairline); border-radius: 6px; padding: 8px 10px; font-family: inherit; font-size: 13px; background: #fff; }
.call-log-footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.call-log-footer input[type="date"] { flex: 1; min-width: 130px; border: 1.5px solid var(--hairline); border-radius: 6px; padding: 6px 10px; font-family: inherit; font-size: 13px; }

/* â”€â”€â”€ Dashboard â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--white);
  border: 1.5px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  transition: box-shadow 0.15s;
}
.kpi-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.kpi-label { font-size: 11px; color: var(--steel); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 7px; font-weight: 600; }
.kpi-value { font-size: 28px; font-weight: 800; line-height: 1; }
.kpi-sub { font-size: 12px; color: var(--steel); margin-top: 4px; }

/* â”€â”€â”€ Client detail â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.detail-back {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--sun); color: var(--ink);
  font-size: 14px; font-weight: 700; cursor: pointer;
  margin-bottom: 20px; border: none; padding: 8px 16px 8px 10px;
  border-radius: 999px; font-family: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
  transition: opacity .15s, transform .1s;
}
.detail-back:active { opacity: 0.8; transform: scale(0.97); }
.detail-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 22px; gap: 16px; flex-wrap: wrap;
}
.detail-name { font-size: 24px; font-weight: 800; }
.detail-id { color: var(--steel); font-size: 13px; margin-top: 4px; }
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  align-items: start;
}
.detail-card {
  background: var(--white);
  border: 1.5px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 14px;
}
.detail-card h3 {
  font-size: 11px; font-weight: 700; margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--steel);
}
.detail-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.detail-field label { font-size: 11px; color: var(--steel); text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 4px; font-weight: 600; }
.detail-field .val {
  font-size: 13.5px;
  padding: 7px 10px;
  background: var(--paper);
  border-radius: 6px;
  border: 1.5px solid transparent;
  cursor: pointer;
  min-height: 34px;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1.4;
}
.detail-field .val:hover { border-color: var(--sun); background: #FFF; }
.detail-field .val.editing {
  background: #fff;
  border-color: var(--sun);
  outline: none;
  width: 100%;
}

.finances-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fin-row { display: flex; flex-direction: column; gap: 4px; }
.fin-row label { font-size: 11px; color: var(--steel); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.fin-row input {
  padding: 8px 10px;
  border: 1.5px solid var(--hairline);
  border-radius: 6px;
  font-size: 14px;
  background: var(--paper);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.fin-row input:focus { border-color: var(--sun); background: #fff; }
.fin-result { font-size: 17px; font-weight: 800; color: #16A34A; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--hairline); }

/* â”€â”€â”€ Comments feed â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.comments-feed { display: flex; flex-direction: column; gap: 10px; }
.comment-row {
  padding: 10px 12px;
  background: var(--paper);
  border-radius: var(--r);
  border-left: 3px solid var(--hairline);
}
.comment-row.mine { border-left-color: var(--sun); }
.comment-text { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.comment-meta { font-size: 11px; color: var(--steel); margin-top: 4px; }
.comment-input-row { display: flex; gap: 8px; margin-top: 12px; }
.comment-input-row textarea {
  flex: 1; padding: 9px 12px; border: 1.5px solid var(--hairline);
  border-radius: var(--r); font-size: 13.5px; resize: none;
  font-family: inherit; outline: none; transition: border-color 0.15s;
  background: var(--paper);
}
.comment-input-row textarea:focus { border-color: var(--sun); background: #fff; }
.comment-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.preset-btn {
  background: var(--bone); border: none; border-radius: 20px;
  padding: 4px 12px; font-size: 12px; cursor: pointer; color: var(--steel);
  font-family: inherit; transition: background 0.12s, color 0.12s;
}
.preset-btn:hover { background: var(--ink); color: #fff; }

/* â”€â”€â”€ Construction fields â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.badge-payment { background: #F0F9FF; color: #0369A1; }
.badge-land    { background: #F0FDF4; color: #166534; }

/* â”€â”€â”€ History â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.history-list { display: flex; flex-direction: column; }
.history-row {
  font-size: 12px;
  color: var(--steel);
  padding: 7px 0;
  border-bottom: 1px solid var(--hairline);
  line-height: 1.5;
}
.history-row:last-child { border-bottom: none; }
.history-field { font-weight: 700; color: var(--ink); }

/* â”€â”€â”€ Tasks on card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.task-add-form { display: flex; gap: 8px; margin-top: 14px; }
.task-add-form input {
  padding: 8px 12px;
  border: 1.5px solid var(--hairline);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  background: var(--paper);
}
.task-add-form input:first-child { flex: 1; }
.task-add-form input:focus { border-color: var(--sun); background: #fff; }

/* â”€â”€â”€ Users â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.users-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--r-lg); overflow: hidden; }
.users-table th, .users-table td {
  text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--hairline); font-size: 13px;
}
.users-table th { font-size: 11px; text-transform: uppercase; color: var(--steel); letter-spacing: 0.05em; font-weight: 700; background: var(--paper); }
.users-table tr:last-child td { border-bottom: none; }

/* â”€â”€â”€ Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--r);
  font-size: 13.5px; font-weight: 700;
  border: none; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  letter-spacing: 0.01em;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--sun); color: var(--ink); box-shadow: 0 2px 8px rgba(89,205,245,0.35); }
.btn-primary:hover { opacity: 0.9; box-shadow: 0 4px 14px rgba(89,205,245,0.4); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.88; }
.btn-ghost {
  background: transparent;
  color: var(--steel);
  border: 1.5px solid var(--hairline);
}
.btn-ghost:hover { background: var(--bone); color: var(--ink); border-color: #CCC8BE; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* â”€â”€â”€ Form fields â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.field { display: flex; flex-direction: column; gap: 5px; }
.field.field-full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--steel); }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1; padding-right: 38px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; padding: 2px 4px; opacity: 0.5; }
.pw-toggle:hover { opacity: 1; }
.field input, .field select, .field textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--hairline);
  border-radius: var(--r);
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sun); }
.field textarea { resize: vertical; }

/* â”€â”€â”€ Modal â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--paper);
  border-radius: 14px;
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 28px 70px rgba(0,0,0,0.35);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 0;
}
.modal-header h2 { font-size: 18px; font-weight: 800; }
.modal-close {
  background: none; border: none; font-size: 18px;
  cursor: pointer; color: var(--steel); padding: 4px 6px;
  border-radius: 6px; transition: background 0.12s;
}
.modal-close:hover { background: var(--bone); color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px 24px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 0 24px 22px;
}

/* â”€â”€â”€ Toast â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: var(--r);
  font-size: 13.5px; font-weight: 500;
  z-index: 1000;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  animation: slide-up 0.2s ease;
}
.toast.error { background: var(--red); }
@keyframes slide-up { from { opacity:0; transform: translateY(14px); } to { opacity:1; transform: translateY(0); } }

.error-msg {
  color: var(--red); font-size: 13px; margin-bottom: 12px;
  padding: 9px 13px; background: #FFE8E8; border-radius: var(--r);
  border-left: 3px solid var(--red);
}

/* â”€â”€â”€ FAB (desktop hidden) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fab { display: none; }

/* â”€â”€â”€ Mobile topbar (desktop hidden) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: var(--ink);
  z-index: 200;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.18);
}
.mobile-topbar-logo { height: 24px; width: auto; }
.mobile-bell-btn {
  position: relative;
  background: none; border: none;
  color: rgba(255,255,255,0.75);
  padding: 6px; cursor: pointer;
  border-radius: 8px;
  display: flex; align-items: center;
  -webkit-tap-highlight-color: transparent;
}
.mobile-bell-btn:active { background: rgba(255,255,255,0.1); }

/* â”€â”€â”€ Mobile stage nav (desktop hidden) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.mobile-stage-nav { display: none; }
.mobile-stage-dots { display: none; }

/* â”€â”€â”€ Kanban col chevron (desktop hidden) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.col-chevron { display: none; }
.col-dot { display: none; }
.col-value-inline { display: none; }
.col-empty { opacity: 0.5; }

/* â”€â”€â”€ Responsive / mobile â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {

  /* â”€â”€ Layout â”€â”€ */
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .mobile-topbar { display: flex; }
  .main-content { margin-left: 0; padding-bottom: 72px; padding-top: 52px; }
  .view { padding: 0; }

  /* â”€â”€ Bottom nav â”€â”€ */
  .bottom-nav {
    height: 62px;
    padding: 4px 4px env(safe-area-inset-bottom, 6px);
    box-shadow: 0 -1px 0 rgba(255,255,255,0.06), 0 -4px 20px rgba(0,0,0,0.25);
  }
  .bnav-link {
    flex: 1;
    padding: 6px 4px 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 10px;
    gap: 3px;
    transition: background 0.15s, color 0.15s;
  }
  .bnav-link svg { width: 22px; height: 22px; stroke-width: 1.8; }
  .bnav-link.active { background: rgba(89,205,245,0.13); color: var(--sun); }

  /* â”€â”€ View header â”€â”€ */
  .view-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--paper);
    padding: 12px 14px 10px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    flex-wrap: wrap;
    gap: 8px;
  }
  .view-header h1 { font-size: 19px; }
  /* Hide desktop add-client button â€” replaced by FAB */
  #btn-new-client { display: none; }

  /* â”€â”€ Pipeline tabs â€” scrollable strip â”€â”€ */
  .pipeline-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    padding: 8px 14px;
    gap: 6px;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
  }
  .pipeline-tabs::-webkit-scrollbar { display: none; }
  .pipeline-tab { white-space: nowrap; font-size: 13px; padding: 5px 14px; }

  /* â”€â”€ Filter bar â€” horizontal scroll â”€â”€ */
  .kanban-filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    padding: 8px 14px;
    gap: 8px;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
  }
  .kanban-filters::-webkit-scrollbar { display: none; }
  .period-pills { flex-wrap: nowrap; gap: 4px; }
  .period-pill { white-space: nowrap; font-size: 12px; padding: 4px 10px; }
  .filter-select { font-size: 12px; padding: 5px 8px; white-space: nowrap; }
  .kfilter-divider { display: none; }

  /* â”€â”€ Stage navigator â”€â”€ */
  .mobile-stage-nav {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    background: var(--white);
    border-bottom: 1px solid var(--hairline);
    gap: 4px;
  }
  .msn-arrow {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--hairline);
    background: var(--paper);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s;
  }
  .msn-arrow:disabled { opacity: 0.3; }
  .msn-arrow:not(:disabled):active { background: var(--bone); }
  .msn-info {
    flex: 1;
    text-align: center;
    min-width: 0;
  }
  .msn-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .msn-meta {
    font-size: 12px;
    color: var(--steel);
    font-weight: 500;
    margin-top: 1px;
  }
  .mobile-stage-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 8px 16px 4px;
    background: var(--paper);
    flex-wrap: wrap;
  }
  .msn-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--hairline);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0;
  }
  .msn-dot.active {
    background: var(--dc, var(--steel));
    transform: scale(1.4);
  }

  /* â”€â”€ Kanban â€” single stage â”€â”€ */
  .kanban {
    overflow-x: visible;
    padding: 12px 12px 20px;
    display: block;
  }
  .kanban-col {
    width: 100% !important;
    min-width: unset !important;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    border: none;
  }
  .kanban-col-header { display: none; }
  .col-value { display: none; }

  /* â”€â”€ Cards â€” Pipedrive-style â”€â”€ */
  .kanban-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 !important;
    background: transparent !important;
  }
  .client-card {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.09);
    padding: 13px 14px;
    background: var(--white);
    border: none;
  }
  .card-name { font-size: 15px; font-weight: 700; }
  .card-phone {
    font-size: 15px;
    font-weight: 600;
    color: #2563EB;
    display: block;
    margin: 5px 0 6px;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
  }
  .card-meta { margin-top: 2px; gap: 4px; }
  .card-footer { margin-top: 6px; }
  .card-tasks {
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 20px;
  }

  /* â”€â”€ FAB â”€â”€ */
  .fab {
    display: flex;
    position: fixed;
    bottom: 78px;
    right: 16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--sun);
    color: var(--ink);
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
    border: none;
    cursor: pointer;
    z-index: 99;
    -webkit-tap-highlight-color: transparent;
  }

  /* â”€â”€ Modals â†’ bottom sheet â”€â”€ */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: 92vh;
    overflow-y: auto;
    animation: slideUp 0.22s ease;
  }
  @keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--hairline);
    border-radius: 2px;
    margin: 10px auto 0;
  }

  /* â”€â”€ Other views â”€â”€ */
  .detail-grid { grid-template-columns: 1fr; }
  .detail-fields { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .finances-grid { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  .view-header .btn-ghost.btn-sm:not(#btn-edit-pipeline) { font-size: 12px; }
}

/* â”€â”€â”€ JS-detected mobile (.is-mobile class on <html>) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Mirrors the media query above so it works even when browser     */
/* overrides the viewport (e.g. Chrome "Request Desktop Site")     */
.is-mobile body, .is-mobile .main-content, .is-mobile #kanban { overflow-x: hidden !important; max-width: 100vw !important; }
.is-mobile .sidebar { display: none !important; }
.is-mobile .bottom-nav { display: flex !important; }
.is-mobile .mobile-topbar { display: flex !important; }
.is-mobile .notif-panel { left: 0 !important; width: 100vw !important; top: 52px !important; }
.is-mobile .main-content { margin-left: 0 !important; padding-bottom: 72px !important; padding-top: 52px !important; }
.is-mobile .view { padding: 0 !important; }
.is-mobile .bottom-nav { height: 62px; padding: 4px 4px env(safe-area-inset-bottom, 6px); box-shadow: 0 -1px 0 rgba(255,255,255,0.06), 0 -4px 20px rgba(0,0,0,0.25); }
.is-mobile .bnav-link { flex: 1; padding: 6px 4px 4px; font-size: 10px; font-weight: 600; border-radius: 10px; gap: 3px; }
.is-mobile .bnav-link.active { background: rgba(89,205,245,0.13); color: var(--sun); }
.is-mobile .view-header { position: sticky; top: 0; z-index: 50; background: var(--paper); padding: 12px 14px 10px; margin-bottom: 0; border-bottom: 1px solid var(--hairline); }
.is-mobile #btn-new-client { display: none !important; }
.is-mobile .pipeline-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap; padding: 8px 14px; background: var(--paper); border-bottom: 1px solid var(--hairline); }
.is-mobile .kanban-filters { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap; padding: 8px 14px; background: var(--paper); border-bottom: 1px solid var(--hairline); }
.is-mobile .period-pills { flex-wrap: nowrap; }
.is-mobile .mobile-stage-nav { display: flex !important; }
.is-mobile .mobile-stage-dots { display: flex !important; }
.is-mobile .kanban { overflow-x: visible !important; padding: 12px 12px 20px !important; display: block !important; }
.is-mobile .kanban-col { width: 100% !important; min-width: unset !important; border-radius: 12px !important; background: transparent !important; box-shadow: none !important; border: none !important; }
.is-mobile .kanban-col-header { display: none !important; }
.is-mobile .col-value { display: none !important; }
.is-mobile .kanban-cards { display: flex !important; flex-direction: column !important; gap: 10px !important; padding: 0 !important; background: transparent !important; }
.is-mobile .client-card { width: 100% !important; border-radius: 12px !important; box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important; padding: 0 !important; background: var(--white) !important; border: 1.5px solid var(--hairline) !important; }
.is-mobile .card-body { padding: 13px 14px !important; }
.is-mobile .client-card { overflow: visible !important; }
.is-mobile .client-card.card-overdue { border-left: 1.5px solid var(--hairline) !important; }
.is-mobile .client-card.card-today   { border-left: 1.5px solid var(--hairline) !important; }
.is-mobile .card-drag-bar {
  position: relative !important; right: auto !important; top: auto !important; bottom: auto !important;
  width: 100% !important; height: 15px !important; opacity: 1 !important;
  background: var(--stage-color, rgba(0,0,0,0.1)) !important;
  border-left: none !important; border-radius: 12px 12px 0 0 !important;
  order: -1 !important;
}
.is-mobile .card-drag-handle { width: 42px !important; height: 5px !important; border-radius: 3px !important; background: rgba(0,0,0,0.22) !important; }
.is-mobile .drag-dots { display: none !important; }
.is-mobile .card-body { padding: 13px 14px !important; }
.is-mobile .card-phone { font-size: 15px !important; font-weight: 600 !important; color: #2563EB !important; display: inline-block !important; margin: 5px 0 6px !important; padding: 2px 0 !important; }
.is-mobile .fab { display: flex !important; }
.is-mobile .modal-overlay { align-items: flex-end !important; padding: 0 !important; }
.is-mobile .modal { width: 100% !important; max-width: 100% !important; border-radius: 18px 18px 0 0 !important; max-height: 92vh !important; }
.is-mobile .detail-grid { grid-template-columns: 1fr !important; }
.is-mobile .detail-fields { grid-template-columns: 1fr !important; }
.is-mobile .form-grid { grid-template-columns: 1fr !important; }
.is-mobile .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
.is-mobile .finances-grid { grid-template-columns: 1fr !important; }
.is-mobile .view { overflow-x: hidden !important; max-width: 100vw !important; box-sizing: border-box !important; }
.is-mobile #view-client-detail { padding: 12px 14px !important; box-sizing: border-box !important; width: 100% !important; }
.is-mobile #client-detail-content { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; overflow-x: hidden !important; }
.is-mobile .detail-header { flex-direction: column !important; gap: 10px !important; }
.is-mobile .detail-card { overflow-x: hidden !important; width: 100% !important; box-sizing: border-box !important; padding: 14px !important; }
.is-mobile .detail-name { font-size: 20px !important; word-break: break-word !important; }
.is-mobile .task-add-form { flex-wrap: wrap !important; }
.is-mobile .task-add-form input[type="date"] { width: 100% !important; flex: none !important; }
.is-mobile .comment-input-row { flex-direction: column !important; }
.is-mobile .comment-input-row textarea { width: 100% !important; box-sizing: border-box !important; }
.is-mobile .table-wrap { overflow-x: auto !important; width: 100% !important; }
.is-mobile table { min-width: unset !important; }
.is-mobile .history-table { font-size: 12px !important; }
.is-mobile .fin-row input { width: 100% !important; box-sizing: border-box !important; }
.is-mobile .detail-field .val, .is-mobile .detail-field select { width: 100% !important; box-sizing: border-box !important; max-width: 100% !important; }

/* â”€â”€â”€ Update banner â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.update-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10001;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  gap: 14px; padding: 10px 16px;
  font-size: 14px; font-weight: 600;
}
.update-banner button {
  background: var(--sun); color: var(--ink);
  border: none; border-radius: 8px;
  padding: 6px 18px; font-size: 13px; font-weight: 800;
  cursor: pointer; white-space: nowrap;
}
.update-banner button:active { opacity: 0.8; }

/* â”€â”€â”€ Offline banner â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: #92400E; color: #FEF3C7;
  text-align: center; font-size: 13px; font-weight: 600;
  padding: 7px 16px; letter-spacing: 0.01em;
}

/* â”€â”€â”€ Mobile account button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.mobile-account-btn {
  background: none; border: none;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,0.85); flex-shrink: 0; border-radius: 8px;
}
.mobile-account-btn:active { background: rgba(255,255,255,0.12); }

/* â”€â”€â”€ Global search overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.search-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(14,14,14,0.5);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 14vh;
  backdrop-filter: blur(2px);
}
.search-overlay.hidden { display: none; }
.search-box {
  background: var(--white);
  border-radius: 16px;
  width: min(560px, calc(100vw - 32px));
  box-shadow: 0 24px 64px rgba(0,0,0,0.24);
  overflow: hidden;
  animation: searchIn 0.14s ease;
}
@keyframes searchIn {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.search-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hairline);
}
#search-global {
  flex: 1; border: none; outline: none;
  font-size: 17px; font-family: inherit;
  padding: 18px 0;
  background: transparent; color: var(--ink);
}
#search-global::placeholder { color: var(--steel); }
.search-esc-hint {
  font-size: 11px; color: var(--steel);
  background: var(--bone); padding: 3px 8px;
  border-radius: 5px; font-family: inherit;
  flex-shrink: 0;
}
.search-results { max-height: 360px; overflow-y: auto; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--hairline);
  transition: background 0.08s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover,
.search-result-item.sr-active { background: var(--bone); }
.sr-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.sr-phone { font-size: 12px; color: var(--steel); margin-top: 2px; }
.sr-meta { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.sr-manager { font-size: 12px; color: var(--steel); }
.search-empty {
  padding: 28px 16px; text-align: center;
  color: var(--steel); font-size: 14px;
}

/* â”€â”€â”€ Account bottom sheet â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sheet-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 8000; backdrop-filter: blur(2px);
}
.account-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 8001;
  background: var(--paper); border-radius: 20px 20px 0 0;
  padding: 0 0 env(safe-area-inset-bottom, 16px);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.account-sheet.open { transform: translateY(0); }
.sheet-handle {
  width: 36px; height: 4px; background: var(--hairline);
  border-radius: 2px; margin: 12px auto 0;
}
.sheet-user-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--hairline);
}
.sheet-user-name { font-weight: 800; font-size: 17px; }
.sheet-user-role { font-size: 13px; color: var(--steel); margin-top: 2px; }
.sheet-actions { padding: 8px 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.sheet-action-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 10px; font-size: 15px; font-weight: 600;
  background: none; border: none; border-radius: 10px;
  cursor: pointer; color: var(--ink); text-align: left; width: 100%;
}
.sheet-action-btn:active { background: var(--bone); }
.sheet-action-install { color: #0369A1; }
.sheet-action-logout { color: var(--red); }

/* â”€â”€â”€ PWA Install â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.mobile-install-btn {
  background: var(--sun); border: none; border-radius: 8px;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink); flex-shrink: 0;
}
.mobile-install-btn:active { opacity: 0.75; }

.btn-install-sidebar {
  display: flex; align-items: center; gap: 7px; justify-content: center;
  margin-top: 8px; width: 100%; padding: 9px 12px;
  background: var(--sun); border: none; border-radius: var(--r);
  font-size: 13px; font-weight: 700; color: var(--ink);
  cursor: pointer; transition: opacity .15s;
}
.btn-install-sidebar:hover { opacity: 0.85; }

.install-step {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--hairline);
}
.install-step:last-of-type { border-bottom: none; }
.install-step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--sun);
  color: var(--ink); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.install-step-title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.install-step-desc { font-size: 13px; color: var(--steel); line-height: 1.4; }

