/* =============================================
   LEADS KANBAN + REMINDERS  —  leads.css
   ASP.NET Web Forms
   ============================================= */

:root {
  --blue:   #1a56db;
  --green:  #0e9f6e;
  --yellow: #e3a008;
  --purple: #7e3af2;
  --red:    #f05252;
  --gray:   #6b7280;
  --dark:   #374151;

  --bg:         #f3f4f6;
  --bg-card:    #ffffff;
  --bg-col:     #f9fafb;
  --border:     #e5e7eb;
  --border2:    #d1d5db;
  --txt:        #111827;
  --txt2:       #6b7280;
  --txt3:       #9ca3af;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
}

/* ── NAVBAR ── */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -.3px;
}
.nav-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.nav-bell {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background .15s;
}
.nav-bell:hover { background: var(--bg); }
.bell-badge {
  position: absolute;
  top: -3px; right: -3px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 18px;
  text-align: center;
  display: none;
}
.bell-badge.show { display: block; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #dbeafe; color: #1e40af;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; cursor: pointer;
}

/* ── PAGE ── */
.page { padding: 20px 24px 48px; }

/* ── TOP BAR ── */
.top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.top-bar h1 { font-size: 20px; font-weight: 700; flex: 1; min-width: 120px; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  width: 250px;
  transition: border-color .15s, box-shadow .15s;
}
.search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}
.search-box svg { width: 16px; height: 16px; color: var(--txt2); flex-shrink: 0; }
.search-box input {
  border: none; outline: none; font-size: 14px;
  color: var(--txt); background: transparent; width: 100%;
}
.search-box input::placeholder { color: var(--txt3); }

.filter-sel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--txt);
  outline: none;
  cursor: pointer;
  height: 38px;
}

.add-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--blue); color: #fff;
  border: none; border-radius: var(--r-md);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; height: 38px;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.add-btn:hover  { background: #1648c0; }
.add-btn:active { transform: scale(.97); }
.add-btn svg { width: 16px; height: 16px; }

/* ── STATS ── */
.stats-row {
  display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 18px;
  flex: 1; min-width: 100px;
}
.stat-lbl { font-size: 11px; color: var(--txt2); text-transform: uppercase; letter-spacing: .5px; }
.stat-val { font-size: 22px; font-weight: 700; color: var(--txt); margin-top: 2px; }
.stat-card.s-new   .stat-val { color: var(--blue); }
.stat-card.s-int   .stat-val { color: var(--green); }
.stat-card.s-qual  .stat-val { color: var(--purple); }
.stat-card.s-visit .stat-val { color: var(--red); }

/* ── KANBAN ── */
.kanban-wrap { overflow-x: auto; padding-bottom: 10px; }
.kanban-wrap::-webkit-scrollbar { height: 6px; }
.kanban-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

.kanban { display: flex; gap: 14px;  }

/* ── COLUMN ── */
.col {
  width: 218px;
  background: var(--bg-col);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  max-height: calc(112vh - 230px);
  min-height: 320px;
}
.col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.col-title { display: flex; align-items: center; gap: 8px; }
.col-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.col-name { font-size: 13px; font-weight: 600; }
.col-badge {
  font-size: 11px; font-weight: 600;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 8px;
  color: var(--txt2);
}

/* ── CARDS LIST ── */
.cards-list {
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1; overflow-y: auto; min-height: 80px;
  transition: background .15s;
}
.cards-list::-webkit-scrollbar { width: 4px; }
.cards-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.cards-list.drag-over {
  background: rgba(26,86,219,.05);
  border-radius: 8px;
  outline: 2px dashed rgba(26,86,219,.3);
  outline-offset: -4px;
}
.empty-hint {
  text-align: center; font-size: 12px; color: var(--txt3); padding: 24px 8px; line-height: 1.7;
}
.empty-hint svg { width: 28px; height: 28px; opacity: .3; display: block; margin: 0 auto 6px; }

/* ── CARD ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 13px;
  cursor: grab;
  user-select: none;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  box-shadow: var(--shadow);
}
.card:hover   { box-shadow: 0 4px 14px rgba(0,0,0,.1); border-color: var(--border2); transform: translateY(-1px); }
.card:active  { cursor: grabbing; }
.card.dragging { opacity: .35; transform: scale(.95); box-shadow: none; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.card-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.card-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0; margin-left: 6px;
}
.card-meta {
  font-size: 12px; color: var(--txt2); margin-bottom: 3px;
  display: flex; align-items: center; gap: 5px;
}
.card-meta svg { width: 12px; height: 12px; flex-shrink: 0; opacity: .65; }
.card-note {
  font-size: 12px; color: var(--txt2); font-style: italic; margin: 5px 0;
  display: flex; align-items: flex-start; gap: 5px;
}
.card-note svg { width: 12px; height: 12px; flex-shrink: 0; margin-top: 1px; opacity: .5; }

.tag {
  font-size: 11px; font-weight: 600;
  border-radius: 4px; padding: 2px 8px;
  margin-bottom: 6px; display: inline-block;
}

.card-footer {
  display: flex; align-items: center; justify-content: space-between; margin-top: 8px;gap:17px;
}
.card-date { font-size: 11px; color: var(--txt3); }

/* reminder indicator on card */
.card-rem-badge {
  font-size: 11px; background: #fff7ed; color: #92400e;
  border: 1px solid #fde68a; border-radius: 4px;
  padding: 1px 6px; display: flex; align-items: center; gap: 3px;
}
.card-rem-badge svg { width: 11px; height: 11px; }

/* ── CARD ACTION BUTTONS ── */
.card-actions {
  display: flex; gap: 5px; margin-top: 9px;
  border-top: 1px solid var(--border); padding-top: 8px;
}
.card-btn {
  flex: 1; font-size: 11px; font-weight: 500;
  border: 1px solid var(--border); background: transparent;
  border-radius: var(--r-sm); padding: 5px 4px;
  cursor: pointer; color: var(--txt2);
  display: flex; align-items: center; justify-content: center; gap: 3px;
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap; overflow: hidden;
}
.card-btn:hover { background: #eff6ff; color: var(--blue); border-color: #bfdbfe; }
.card-btn.rem-btn:hover { background: #fff7ed; color: #92400e; border-color: #fde68a; }
.card-btn svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ── MODAL BASE ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 200;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: #fff; border-radius: var(--r-lg);
  border: 1px solid var(--border); padding: 24px;
  width: 340px; max-width: 95vw;
  box-shadow: var(--shadow-lg);
  animation: mIn .18s ease;
}
@keyframes mIn {
  from { opacity: 0; transform: scale(.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal h3 { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.modal label {
  font-size: 11px; font-weight: 700; color: var(--txt2);
  display: block; margin-bottom: 4px; margin-top: 12px;
  text-transform: uppercase; letter-spacing: .4px;
}
.modal input, .modal select, .modal textarea {
  width: 100%;
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 9px 12px; font-size: 14px;
  color: var(--txt); background: var(--bg); outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.modal textarea { resize: vertical; min-height: 70px; }
.modal input:focus, .modal select:focus, .modal textarea:focus {
  border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn-cancel {
  flex: 1; border: 1px solid var(--border); background: transparent;
  color: var(--txt2); border-radius: var(--r-md); padding: 10px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .12s;
}
.btn-cancel:hover { background: var(--bg); }
.btn-save {
  flex: 1; background: var(--blue); color: #fff;
  border: none; border-radius: var(--r-md); padding: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .12s, transform .1s;
}
.btn-save:hover  { background: #1648c0; }
.btn-save:active { transform: scale(.97); }
.btn-save.green  { background: var(--green); }
.btn-save.green:hover { background: #0a7a56; }

/* ── REMINDER MODAL SPECIFIC ── */
.rem-modal-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
}
.rem-modal-head .icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff7ed; color: #92400e;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  flex-shrink: 0;
}
.rem-lead-name { font-size: 13px; color: var(--txt2); margin-bottom: 14px; }

/* ── NOTIFICATION TOAST ── */
.toast-wrap {
  position: fixed; top: 68px; right: 16px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 999; pointer-events: none;
}
.toast {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--yellow);
  border-radius: var(--r-md);
  padding: 12px 16px;
  min-width: 280px; max-width: 340px;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: tIn .25s ease;
  display: flex; align-items: flex-start; gap: 12px;
}
.toast.success { border-left-color: var(--green); }
@keyframes tIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes tOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}
.toast.removing { animation: tOut .25s ease forwards; }
.toast-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-title { font-size: 13px; font-weight: 700; color: var(--txt); }
.toast-msg   { font-size: 12px; color: var(--txt2); margin-top: 2px; }
.toast-time  { font-size: 11px; color: var(--txt3); margin-top: 3px; }
.toast-close {
  background: none; border: none; cursor: pointer;
  color: var(--txt3); font-size: 16px; padding: 0; line-height: 1;
  flex-shrink: 0;
}
.toast-close:hover { color: var(--txt); }

/* ── REMINDER LIST PANEL ── */
.rem-panel {
  display: none; position: fixed;
  top: 62px; right: 16px;
  width: 320px; max-height: 480px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 150; overflow: hidden;
  flex-direction: column;
  animation: mIn .18s ease;
}
.rem-panel.open { display: flex; }
.rem-panel-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.rem-panel-head h4 { font-size: 15px; font-weight: 700; }
.rem-panel-close {
  background: none; border: none; cursor: pointer;
  color: var(--txt2); font-size: 18px; line-height: 1;
}
.rem-list { overflow-y: auto; flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.rem-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  display: flex; align-items: flex-start; gap: 10px;
}
.rem-item.done { opacity: .5; }
.rem-item-left { flex: 1; }
.rem-item-title { font-size: 13px; font-weight: 600; color: var(--txt); }
.rem-item-sub   { font-size: 12px; color: var(--txt2); margin-top: 2px; }
.rem-item-date  { font-size: 11px; color: var(--txt3); margin-top: 3px; }
.rem-item-due   { font-size: 11px; color: var(--red); font-weight: 600; }
.rem-done-btn {
  background: none; border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 3px 8px;
  font-size: 11px; cursor: pointer; color: var(--txt2);
  white-space: nowrap; transition: background .12s, color .12s;
  flex-shrink: 0;
}
.rem-done-btn:hover { background: #dcfce7; color: #166534; border-color: #86efac; }
.rem-empty { text-align: center; font-size: 13px; color: var(--txt3); padding: 32px 12px; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .page { padding: 12px 12px 32px; }
  .top-bar h1 { font-size: 17px; }
  .search-box { width: 100%; }
  .stats-row { display: none; }
}
.filter-date{
    height:44px;
    padding:0 14px;
    border:1px solid #d1d5db;
    border-radius:12px;
    background:#fff;
    font-size:14px;
    color:#111827;
    outline:none;
    transition:0.2s;
    min-width:150px;
}

.filter-date:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,0.15);
}
.nav-user-wrap{
    position:relative;
}

.user-menu{
    position:absolute;
    top:55px;
    right:0;
    width:180px;
    background:#fff;
    border-radius:14px;
    box-shadow:0 10px 30px rgba(0,0,0,0.12);
    padding:8px;
    display:none;
    flex-direction:column;
    z-index:9999;
    border:1px solid #e5e7eb;
}

.user-menu.open{
    display:flex;
}

.user-menu button{
    border:none;
    background:none;
    padding:12px 14px;
    text-align:left;
    border-radius:10px;
    cursor:pointer;
    font-size:14px;
    transition:0.2s;
}

.user-menu button:hover{
    background:#f3f4f6;
}
/* ── LAST REMARK BOX ── */
.last-remark-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.last-remark-label {
    font-size: 11px;
    font-weight: 700;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 4px;
}
.last-remark-text {
    font-size: 13px;
    color: #15803d;
    line-height: 1.5;
}

/* ── ADD REMARK BUTTON ── */
.add-remark-btn {
    width: 100%;
    padding: 9px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: background .15s;
}
.add-remark-btn:hover { background: #dcfce7; }

/* ── MORE BUTTON ── */
.more-btn { position: relative; }
.more-count {
    background: #dbeafe;
    color: #1e40af;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 6px;
    margin-left: 3px;
}
.more-btn:hover {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

/* ── REMARKS MODAL ── */
.remarks-modal {
    width: 420px !important;
    max-height: 80vh;
    overflow-y: auto;
}
.remarks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0;
    max-height: 400px;
    overflow-y: auto;
}
.remark-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    position: relative;
}
.remark-item.latest {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.remark-text {
    font-size: 14px;
    color: #111827;
    line-height: 1.5;
    margin-bottom: 8px;
}
.remark-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #6b7280;
}
.remark-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: #dcfce7;
    color: #166534;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}
.no-remarks {
    text-align: center;
    padding: 32px;
    color: #9ca3af;
    font-size: 13px;
}
.card-btn11 {
  flex: 1; font-size: 11px; font-weight: 500;
  border: 1px solid var(--border); background: transparent;
  border-radius: var(--r-sm); padding: 5px 4px;
  cursor: pointer; color: var(--txt2);
  display: flex; align-items: center; justify-content: center; gap: 3px;
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap; overflow: hidden;
}
.card-btn11:hover { background: #eff6ff; color: var(--blue); border-color: #bfdbfe; }
.card-btn11.rem-btn:hover { background: #fff7ed; color: #92400e; border-color: #fde68a; }
.card-btn11 svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ── REMINDER HIGHLIGHT CARD ── */
.card-has-reminder {
    border-left: 3px solid  #ef0000;
}

.card-has-reminder::before {
    content: "";
    display: block;
    height: 3px;
    background: #ef0000;
    border-radius: 10px 10px 0 0;
    margin: -12px -13px 10px -13px;
}

.card-has-reminder:hover {
    border-left-color: #ef0000;
    box-shadow: 0 4px 14px rgba(245,158,11,.15);
}

