/* ============================================
   LeadFlow CRM - Global Styles
   Style: Modern dark sidebar, clean cards
   Font: DM Sans + DM Mono
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg-dark:    #0F1117;
  --bg-card:    #1A1D27;
  --bg-input:   #232635;
  --sidebar-w:  240px;
  --border:     rgba(255,255,255,0.08);
  --border-act: rgba(99,102,241,0.5);

  --text-primary:   #F0F0F8;
  --text-secondary: #9094A8;
  --text-muted:     #5A5E72;

  --accent:      #6366F1;
  --accent-glow: rgba(99,102,241,0.25);
  --accent-2:    #818CF8;
  --green:       #22C55E;
  --red:         #EF4444;
  --light-red:   #f38a8a;
  --yellow:      #F59E0B;
  --blue:        #3B82F6;
  --purple:      #A855F7;
  --pink:        #EC4899;
  --teal:        #14B8A6;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.sidebar-nav {
  padding: 12px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 12px 10px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--accent-glow);
  color: var(--accent-2);
  border: 1px solid var(--border-act);
}

.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}


.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}

.user-name { font-size: 0.8rem; font-weight: 600; }
.user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.logout-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 1rem;
  transition: color 0.15s;
}

.logout-btn:hover { color: var(--red); }

/* ── Main content ── */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15,17,23,0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.main-content {
  padding: 24px 28px;
  flex: 1;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover { transform: translateY(-2px); border-color: var(--border-act); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-color, var(--accent));
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-family: 'DM Mono', monospace;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

.stat-change {
  font-size: 0.75rem;
  margin-top: 8px;
  font-weight: 600;
}

.stat-change.up   { color: var(--green); }
.stat-change.down { color: var(--red); }
.stat-change.drop { color: var(--light-red); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent-2); }

.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-danger  { background: var(--red);   color: #fff; border-color: var(--red); }
.btn-warning { background: var(--yellow);color: #111; border-color: var(--yellow); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-icon { padding: 7px; }

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  background: rgba(255,255,255,0.03);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b7b8bc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.025); }

tbody td {
  padding: 12px 14px;
  vertical-align: middle;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-new         { background: rgba(99,102,241,0.15); color: var(--accent-2); border: 1px solid rgba(99,102,241,0.3); }
.badge-contacted   { background: rgba(59,130,246,0.15); color: #60A5FA; border: 1px solid rgba(59,130,246,0.3); }
.badge-qualified   { background: rgba(20,184,166,0.15); color: #2DD4BF; border: 1px solid rgba(20,184,166,0.3); }
.badge-proposal    { background: rgba(245,158,11,0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }
.badge-negotiation { background: rgba(168,85,247,0.15); color: #C084FC; border: 1px solid rgba(168,85,247,0.3); }
.badge-won         { background: rgba(34,197,94,0.15);  color: #4ADE80; border: 1px solid rgba(34,197,94,0.3); }
.badge-lost        { background: rgba(239,68,68,0.15);  color: #F87171; border: 1px solid rgba(239,68,68,0.3); }

.priority {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.priority::before { content: '●  '; font-size: 0.6rem; }
.priority-low    { color: var(--text-muted); }
.priority-medium { color: var(--yellow); }
.priority-high   { color: var(--red); }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-label span { color: var(--red); }

.form-control,
.form-select,
textarea.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

/* Override multiple select css */
.vscomp-toggle {
  background: #252838!important;
  border: 1px solid #3b4054!important;
  border-radius: 8px!important;
  color: #fff!important;
  min-height: 46px!important;
}

.vscomp-toggle:hover {
  border-color: #4f6ef7!important;
}

.vscomp-dropbox {
  background: #252838!important;
  border: 1px solid #3b4054!important;
  color: #fff!important;
}

.vscomp-option {
  color: #fff!important;
}

.vscomp-option:hover {
  background: #30354b!important;
}

.vscomp-option.selected {
  background: #3b82f6!important;
  color: #fff!important;
}

.vscomp-search-input {
  background: #1f2230!important;
  color: #fff!important;
  border: 1px solid #3b4054!important;
}

.vscomp-search-input::placeholder {
  color: #8d93a8!important;
}

.vscomp-clear-button {
  color: #fff!important;
}
/* Override multiple select css */

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239094A8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-hint {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-error {
  font-size: 0.73rem;
  color: #ff9090;
  margin-top: 5px;
}

/* ── Flash messages ── */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

.flash span {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.flash-success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); color: #4ADE80; }
.flash-success span { background: var(--green); color: #fff; }
.flash-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #F87171; }
.flash-error span { background: var(--red); color: #fff; }

.success_message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ADE80;
}

.failed_message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
  background: rgba(239,68,68,0.12); 
  border: 1px solid rgba(239,68,68,0.3); 
  color: #F87171;
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}

.sort-link:hover {
  color: var(--accent);
}

.sort-link::after {
  font-size: 12px;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; }

/* ── Activity Feed ── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }

.activity-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.activity-body { flex: 1; }

.activity-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.activity-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.activity-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Pipeline ── */
.pipeline {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.pipeline-col {
  min-width: 220px;
  max-width: 240px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  flex-shrink: 0;
}

.pipeline-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.pipeline-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pipeline-count {
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: block;
  color: inherit;
}

.pipeline-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.pipeline-card-title { font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; }
.pipeline-card-sub { font-size: 0.75rem; color: var(--text-muted); }
.pipeline-card-value { font-size: 0.8rem; color: var(--green); font-weight: 600; margin-top: 8px; font-family: 'DM Mono', monospace; }

/* ── Filters bar ── */
/* Made changes to adjust filter alignment */
/* Filter layout: 4 columns */
.filters-bar-lead {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 12px;
  width: 100%;
  margin-bottom: 18px;
  align-items: end;
}

/* Each filter field */
.filters-bar-lead .filter-item {
  min-width: 0;
  display: grid;
  gap: 6px;
}

/* Inputs and dropdowns */
.filters-bar-lead input,
.filters-bar-lead select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Labels */
.filters-bar-lead label {
  margin: 0;
  font-size: 14px;
}

/* Filter and export buttons */
.filters-bar-lead .filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filters-bar-lead .filter-actions button,
.filters-bar-lead .filter-actions .btn {
  white-space: nowrap;
}

.clear-filter-lead {
  padding: 0px 2px;
  background: none;
}

.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* Tablet: 2 columns */
@media (max-width: 992px) {
  .filters-bar-lead {
      grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile: 1 column */
@media (max-width: 576px) {
  .filters-bar-lead {
      grid-template-columns: 1fr;
  }
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-input-wrap .form-control { padding-left: 32px; }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  place-items: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: grid; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title { font-size: 1.1rem; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
}

.modal-close:hover { color: var(--text-primary); }

/* ── Grids ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.content-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }

/* ── Lead detail ── */
.lead-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.lead-status-bar {
  display: flex;
  gap: 6px;
  margin: 18px 0;
}

.status-step {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.3s;
}

.status-step.active { background: var(--accent); }
.status-step.done   { background: var(--green); }
.status-step.lost   { background: var(--red); }

/* ── Progress bar ── */
.progress-bar-wrap {
  background: var(--bg-input);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.5s ease;
}

/* ── Contact info box ── */
.info-grid {
  display: grid;
  gap: 12px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.info-icon { font-size: 1rem; width: 20px; margin-top: 2px; }
.info-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.info-value { font-size: 0.875rem; color: var(--text-primary); }
.info-value a { color: var(--accent-2); text-decoration: none; }
.info-value a:hover { text-decoration: underline; }

/* ── Login page ── */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 20% 40%, rgba(99,102,241,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(168,85,247,0.08) 0%, transparent 60%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 42px; height: 42px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 0 24px var(--accent-glow);
}

.login-title { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.03em; }
.login-sub { font-size: 1rem; color: var(--text-muted); margin-top: 3px; }

.login-form h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.login-form p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 24px; }

.demo-accounts {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 20px;
}

.demo-title { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }

.demo-btn {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-btn:last-child { margin-bottom: 0; }
.demo-btn:hover { border-color: var(--accent); }
.demo-btn-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.konverge-mini-logo {
  width: 50px;
}

.forgot-pwd {
  float: right; 
  margin-bottom: 10px; 
  color:aliceblue; 
  font-size: 0.8rem;
}

.action-div {
  display:flex;
  gap:6px;
  align-items:center
}

.pagination-container {
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:15px;
  margin-top:20px;
  margin-bottom: 20px;
  padding:5px 10px;
  background:#1a1d27;
  border:1px solid #1a1d27;
  border-radius:8px;
}

.pagination-info,
.pagination-page-info {
  font-size: 0.85rem;
  color: #fff;
}

.pagination-wrap {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.pagination-btn {
  padding:3px 14px;
  border:1px solid #1a1d27;
  text-decoration:none;
  border-radius:6px;
  background:#1a1d27;
  color:#fff;
  transition:0.2s;
  font-size:0.85rem;
}

.pagination-btn:hover {
  background:#12151f;
}

.pagination-btn.active {
  background:#4e587b;
  color:#fff;
  border-color:#4e587b;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ── Fund Summary grid removed - delete any leftover .fund-summary-*
   rules from your stylesheet if you still have them; they're unused now. */
 
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
 
.form-actions .budget-submit-btn {
  flex: 1;
  margin-top: 0;
}
 
.btn-icon {
  background: none;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}
 
.btn-icon:hover {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.w-100 {
  width: 100%;
}

.demo-btn-info { flex: 1; }
.demo-btn-name { font-size: 0.8rem; font-weight: 600; }
.demo-btn-role { font-size: 0.7rem; color: var(--text-muted); }
.demo-btn-tag { font-size: 0.7rem; color: var(--text-muted); font-family: 'DM Mono', monospace; }

/* ── Dashboard chart bars ── */
.chart-bar-wrap { display: flex; align-items: flex-end; gap: 8px; height: 100px; }
.chart-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.chart-bar { width: 100%; border-radius: 4px 4px 0 0; transition: height 0.6s ease; }
.chart-bar-label { font-size: 0.65rem; color: var(--text-muted); text-align: center; }
.chart-bar-val { font-size: 0.7rem; color: var(--text-secondary); font-weight: 600; }

/* ── Utility ── */
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-blue   { color: var(--blue); }
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent-2); }
.text-sm     { font-size: 0.8rem; }
.text-xs     { font-size: 0.79rem; }
.text-center { text-align: center; }
.font-mono   { font-family: 'DM Mono', monospace; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
  .main-content { padding: 16px; }
  .topbar { padding: 14px 16px; }
}

@media (max-width: 600px) {
  .three-col { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
.email-search-wrapper{
    position:relative;
}

#emailSuggestions{
    position:absolute;
    top:100%;
    left:0;
    right:0;
    width:100%;

    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;

    /* max-height:250px; */
    overflow-y:auto;

    z-index:99999;
    display:none;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
}
#reportingSuggestions{
   position:absolute;
    left:0;
    right:0;
    width:100%;

    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;

    /* max-height:250px; */
    overflow-y:auto;

    z-index:99999;
    display:none;
    box-shadow:0 8px 20px rgba(0,0,0,.08);

    margin-bottom:5px;
}
.autocomplete-item{
      display:flex;
    align-items:flex-start;
    gap: 1px;
    padding:6px 15px;
    cursor:pointer;
}

.autocomplete-item:hover{
    background:#c7f93e;
        cursor:pointer;

}

.reporting-item{
      display:flex;
    align-items:flex-start;
    gap: 1px;
    padding:6px 15px;
    cursor:pointer;
}

.reporting-item:hover{
    background:#c7f93e;
        cursor:pointer;

}

.user-avatar{
    width:40px;
    height:40px;
    border-radius:50%;
    background:#3B82F6;
    color:#fff;
    font-weight:600;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}

.user-info{
  display:flex;
  align-items: center;
  gap: 10px;
}

.user-name{
    font-size:14px;
    font-weight:600;
    color:white;
}

.user-email{
    font-size:12px;
    color:#6b7280;
    word-break:break-all;
}

@media(max-width:768px){

    .autocomplete-item{
        padding:10px;
    }

    .user-avatar{
        width:34px;
        height:34px;
        font-size:13px;
    }

    .user-name{
        font-size:13px;
    }

    .user-email{
        font-size:11px;
    }
}
.sync-spin{
    animation: syncSpin 1s linear infinite;
}

@keyframes syncSpin{
    from{
        transform:rotate(0deg);
    }
    to{
        transform:rotate(360deg);
    }
}
.flash {
    transition: opacity .5s ease;
}

.user-info2{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:flex-start;
  text-align:left;
  flex:1;
  color: #0F1117;
}
.user-name2{
    font-size:14px;
    font-weight:600;
    color:rgb(3, 3, 3);
}
/* new added by ak on 18-06-2026 */.dropdown-search{
    position:relative;
    width:100%;
}

#searchInput{
    width:100%;
    padding:10px 12px;
    border:1px solid #ddd;
    border-radius:6px;
    box-sizing:border-box;
}

.dropdown-options{
    position:absolute;
    top:100%;
    left:0;
    right:0;
  background: var(--bg-input);
    border:1px solid #ddd;
    border-top:none;
    /* max-height:250px; */
    overflow-y:auto;
    display:none;
    z-index:9999;
    color:#ffffff;
}

.option{
    display:flex;              /* Avatar + Name in same line */
    align-items:center;        /* Vertical center */
    gap:8px;                   /* Space between avatar and name */
    padding:10px;
    cursor:pointer;
    color:#ffffff;
}

.option:hover{
    background:blueviolet;
}


.option span:last-child{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* new for add arrow dropdown */
.dropdown-search{
    position:relative;
    width:100%;
}

.search-input-wrapper{
    position:relative;
}

#searchInput{
    padding-right:40px;
    cursor:pointer;
}

.dropdown-arrow{
    position:absolute;
    right:14px;
    top:50%;
    transform:translateY(-50%);
    font-size:12px;
    color:#6b7280;
    pointer-events:none;
    transition:.2s;
}

.dropdown-search.open .dropdown-arrow{
    transform:translateY(-50%) rotate(180deg);
}

/* new added by akash 01-07-2026 */
.flatpickr-calendar {
    background: var(--bg-card) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color) !important;
}

.flatpickr-months,
.flatpickr-weekdays {
    background: var(--bg-card) !important;
}

.flatpickr-day {
    color: var(--text-color) !important;
}

.flatpickr-day:hover {
    background: #374151 !important;
}

.flatpickr-day.selected {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 1;
    cursor: pointer;
}

.back-login-div {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.back-login-div a {
  color: aliceblue;
}

/* =========================================
   LOGIN PAGE — THEME TOGGLE
========================================= */

.auth-theme-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 10;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--bg-card);
  color: var(--text-primary);

  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;

  transition: background 0.2s ease, border-color 0.2s ease;
}

.auth-theme-toggle:hover {
  border-color: var(--accent);
}

/* Light theme: login page only */
html[data-theme="light"] body.auth-class {
  --bg-dark: #F3F5FA;
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;

  --text-primary: #18181B;
  --text-secondary: #52525B;
  --text-muted: #71717A;

  --border: #E4E4E7;

  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.10);
}

/* Login background */
html[data-theme="light"] .auth-class .login-bg {
  background:
    radial-gradient(
      ellipse 60% 60% at 20% 40%,
      rgba(99, 102, 241, 0.09) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 50% at 80% 70%,
      rgba(168, 85, 247, 0.07) 0%,
      transparent 60%
    );
}

/* Login card */
html[data-theme="light"] .auth-class .login-card {
  border-color: #E4E4E7;
}

/* Form fields */
html[data-theme="light"] .auth-class .form-control {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border);
}

html[data-theme="light"] .auth-class .form-control::placeholder {
  color: #A1A1AA;
}

/* Labels and links */
html[data-theme="light"] .auth-class .form-label {
  color: var(--text-secondary);
}

html[data-theme="light"] .auth-class .forgot-pwd {
  color: #4F46E5;
}

html[data-theme="light"] .auth-class .forgot-pwd:hover {
  color: #3730A3;
}

/* Flash messages */
html[data-theme="light"] .auth-class .flash-error {
  color: #991B1B;
  background: #FEE2E2;
}

html[data-theme="light"] .auth-class .flash-success {
  color: #166534;
  background: #DCFCE7;
}

html[data-theme="light"] .auth-class .back-login-div a {
  color: #18181B;
}

/* Theme toggle on small screens */
@media (max-width: 480px) {
  .auth-theme-toggle {
    top: 12px;
    right: 12px;
  }

  .auth-class .login-card {
    width: calc(100% - 32px);
    padding: 32px 22px;
  }
}

/* 1. Topbar: Replace rgba(15,17,23,0.8) */
.topbar {
  background: var(--bg-topbar, rgba(15,17,23,0.8));
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* 2. Nav Link hover: Replace rgba(255,255,255,0.05) */
.nav-link:hover {
  background: var(--hover-bg, rgba(255,255,255,0.05));
  color: var(--text-primary);
}

/* 3. Table header & row hover: Replace white transparencies */
thead th {
  background: var(--table-th-bg, rgba(255,255,255,0.03));
  color: var(--table-th-color, #b7b8bc);
}
tbody tr:hover {
  background: var(--hover-bg, rgba(255,255,255,0.025));
}

/* 4. Pagination bar & text: Replace hardcoded #1a1d27 and #fff */
.pagination-container {
  background: var(--pagination-bg, #1a1d27);
  border: 1px solid var(--border);
}
.pagination-info,
.pagination-page-info {
  color: var(--text-secondary);
}
.pagination-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.pagination-btn:hover {
  background: var(--hover-bg);
  border-color: var(--accent);
}

/* 5. Datepicker Calendar icon: Disable dark inversion in light mode */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: var(--calendar-filter, invert(1));
  opacity: 0.8;
  cursor: pointer;
}

/* 6. Smooth theme transition on body */
body {
  transition: background-color 0.25s ease, color 0.25s ease;
}

.move-to-lead-btn {
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 0.5px solid green;
  color: green;
  font-weight: bold;
  background: #ddf7dd;
}

.reject-lead-btn {
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 0.5px solid #c80101;
  color: #c80101;
  font-weight: bold;
  background: #fee6e6;
}

.log-tr-opt {
  opacity:0.5;
}

.log-tr-error {
  background: #873b3e;
}

/* Top-Right Theme Toggle on Login Page */
.login-theme-switch {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;
}

.login-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 14px;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.login-theme-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Fix invisible forgot password in light mode */
.forgot-pwd {
  float: right; 
  margin-bottom: 12px; 
  color: var(--accent, #6366f1);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.15s;
}
.forgot-pwd:hover {
  text-decoration: underline;
}

/* Divider styling */
.login-divider {
  text-align: center;
  margin: 14px 0 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
}
.login-divider::before,
.login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.login-divider::before { left: 0; }
.login-divider::after { right: 0; }

/* Light Theme Background Gradient */
[data-theme="light"] .login-bg {
  background:
    radial-gradient(ellipse 60% 60% at 20% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 85% 75%, rgba(14, 165, 233, 0.08) 0%, transparent 60%);
}

/* Microsoft button adaptive display */
.ms-btn-light { display: none; }
.ms-btn-dark { display: inline-block; }
[data-theme="light"] .ms-btn-light { display: inline-block; }
[data-theme="light"] .ms-btn-dark { display: none; }