/* ── ViaKashmir CRM – Design System ──────────────────────────────────────── */
:root {
  /* Brand Palette – Kashmir Green + Saffron */
  --green-900: #0c3520;
  --green-800: #154d30;
  --green-700: #1a5c3a;
  --green-600: #22763f; /* sidebar active */
  --green-500: #2d9548;
  --green-100: #e8f5ee;
  --green-50: #f2faf5;

  --saffron: #f5821f;
  --saffron-dark: #d96a10;
  --saffron-light: #fff0e0;

  --slate-900: #1a2332;
  --slate-700: #374151;
  --slate-500: #6b7280;
  --slate-300: #d1d5db;
  --slate-100: #f3f4f6;
  --slate-50: #f9fafb;
  --white: #ffffff;

  /* Status Colors */
  --status-new: #2563eb;
  --status-contacted: #d97706;
  --status-qualified: #7c3aed;
  --status-converted: #059669;
  --status-lost: #dc2626;

  /* Platform Colors */
  --meta-color: #1877f2;
  --google-color: #ea4335;
  --wa-color: #25d366;

  --sidebar-w: 240px;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
}

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

body {
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  background: var(--slate-100);
  color: var(--slate-900);
  display: flex;
  min-height: 100vh;
  font-size: 14px;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(
    180deg,
    var(--green-900) 0%,
    var(--green-800) 60%,
    #1c4a32 100%
  );
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.menu-close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  right: 12px;
  padding: 8px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: "Playfair Display", serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.brand-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.18s ease;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.nav-item.active {
  background: linear-gradient(90deg, var(--saffron), #e87010);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(245, 130, 31, 0.35);
}
.nav-item svg {
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-sync {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.18s;
}
.btn-sync:hover {
  background: rgba(255, 255, 255, 0.18);
}
.btn-sync.syncing {
  opacity: 0.7;
  pointer-events: none;
}
.btn-sync.syncing svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.last-sync {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

/* ── Main Content ────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--white);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--slate-300);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--green-900);
  cursor: pointer;
  padding: 4px;
}

.page-title {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--green-900);
  letter-spacing: -0.3px;
}

.topbar-date {
  font-size: 12.5px;
  color: var(--slate-500);
}

/* ── Views ──────────────────────────────────────────────────────────────── */
.view {
  display: none;
  padding: 24px 28px;
  flex-direction: column;
  gap: 20px;
}
.view.active {
  display: flex;
}

/* ── Stat Grid ───────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border-left: 4px solid transparent;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.05;
}
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--slate-500);
}
.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  margin: 6px 0 2px;
  line-height: 1;
}
.stat-card .stat-sub {
  font-size: 11px;
  color: var(--slate-500);
}

.stat-card.total {
  border-left-color: var(--green-700);
  color: var(--green-700);
}
.stat-card.new {
  border-left-color: var(--status-new);
  color: var(--status-new);
}
.stat-card.contacted {
  border-left-color: var(--status-contacted);
  color: var(--status-contacted);
}
.stat-card.qualified {
  border-left-color: var(--status-qualified);
  color: var(--status-qualified);
}
.stat-card.converted {
  border-left-color: var(--status-converted);
  color: var(--status-converted);
}
.stat-card.lost {
  border-left-color: var(--status-lost);
  color: var(--status-lost);
}

.stat-card .stat-value {
  color: var(--slate-900);
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--slate-100);
}
.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--green-900);
  font-family: "Playfair Display", serif;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

/* ── Source Chart ────────────────────────────────────────────────────────── */
.source-chart {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.source-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.source-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}
.source-bar-track {
  height: 8px;
  background: var(--slate-100);
  border-radius: 4px;
  overflow: hidden;
}
.source-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.fill-meta {
  background: var(--meta-color);
}
.fill-google {
  background: var(--google-color);
}

/* ── Recent List ─────────────────────────────────────────────────────────── */
.recent-list {
  padding: 0 0 8px;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--slate-50);
  cursor: pointer;
  transition: background 0.15s;
}
.recent-item:hover {
  background: var(--slate-50);
}
.recent-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: white;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.recent-info {
  flex: 1;
  min-width: 0;
}
.recent-name {
  font-weight: 500;
  font-size: 13.5px;
}
.recent-meta {
  font-size: 11.5px;
  color: var(--slate-500);
  margin-top: 2px;
}

/* ── Filters ─────────────────────────────────────────────────────────────── */
.filters-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-input,
.filter-select {
  padding: 9px 14px;
  border: 1.5px solid var(--slate-300);
  border-radius: 8px;
  font-size: 13.5px;
  background: var(--white);
  color: var(--slate-900);
  outline: none;
  transition: border-color 0.15s;
}
.filter-input {
  flex: 1;
  min-width: 200px;
}
.filter-input:focus,
.filter-select:focus {
  border-color: var(--green-600);
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.table-card {
  overflow: hidden;
}
.table-wrap {
  overflow-x: auto;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
}
.leads-table th {
  padding: 12px 16px;
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.leads-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--slate-100);
  font-size: 13.5px;
  vertical-align: middle;
}
.leads-table tbody tr:hover {
  background: var(--green-50);
  cursor: pointer;
}
.leads-table tbody tr:last-child td {
  border-bottom: none;
}

.empty-msg {
  text-align: center;
  color: var(--slate-500);
  padding: 40px !important;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-new {
  background: #dbeafe;
  color: var(--status-new);
}
.badge-contacted {
  background: #fef3c7;
  color: var(--status-contacted);
}
.badge-qualified {
  background: #ede9fe;
  color: var(--status-qualified);
}
.badge-converted {
  background: #d1fae5;
  color: var(--status-converted);
}
.badge-lost {
  background: #fee2e2;
  color: var(--status-lost);
}
.badge-meta {
  background: #dbeafe;
  color: var(--meta-color);
}
.badge-google {
  background: #fee2e2;
  color: var(--google-color);
}
.badge-instagram {
  background: #f3e8ff;
  color: #9333ea;
}

/* ── OAuth Connect Section ───────────────────────────────────────────────── */
.oauth-success {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-50);
  border: 1.5px solid var(--green-500);
  color: var(--green-800);
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}
.oauth-success svg {
  color: var(--green-600);
  flex-shrink: 0;
}

.connect-section {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  background: var(--slate-50);
  border-radius: 12px;
  margin: 12px;
}
.connect-platform-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--slate-900);
}
.connect-desc {
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.6;
  max-width: 400px;
}
.btn-connect-fb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1877f2;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.25);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}
.btn-connect-fb:hover {
  background: #166fe5;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(24, 119, 242, 0.35);
}
.connect-note {
  font-size: 11.5px;
  color: var(--slate-400);
  line-height: 1.6;
  max-width: 320px;
}
.connect-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  color: var(--slate-400);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.connect-divider a {
  color: var(--slate-500);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
.connect-divider a:hover {
  color: var(--green-700);
}

/* ── Status Select (inline in table) ──────────────────────────────────────── */
.status-select {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1.5px solid var(--slate-300);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  background: var(--white);
  max-width: 130px;
}
.status-select:focus {
  border-color: var(--green-600);
}

.assign-select {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1.5px solid var(--slate-300);
  font-size: 12.5px;
  cursor: pointer;
  outline: none;
  background: var(--white);
  max-width: 130px;
}
.assign-select:focus {
  border-color: var(--green-600);
}

/* ── Action Buttons ──────────────────────────────────────────────────────── */
.btn-icon {
  background: none;
  border: 1.5px solid var(--slate-300);
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--slate-700);
  transition: all 0.15s;
}
.btn-icon:hover {
  border-color: var(--green-600);
  color: var(--green-700);
  background: var(--green-50);
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 14px 16px;
  border-top: 1px solid var(--slate-100);
  font-size: 12.5px;
}
.page-btn {
  padding: 5px 12px;
  border: 1.5px solid var(--slate-300);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
  font-size: 12.5px;
  transition: all 0.15s;
}
.page-btn:hover,
.page-btn.active {
  background: var(--green-700);
  color: white;
  border-color: var(--green-700);
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Two Column Layout ───────────────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  align-items: start;
}

/* ── Account Form ────────────────────────────────────────────────────────── */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px;
}
.account-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--slate-700);
}
.account-form input,
.account-form select {
  padding: 10px 14px;
  border: 1.5px solid var(--slate-300);
  border-radius: 8px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
  background: var(--white);
}
.account-form input:focus,
.account-form select:focus {
  border-color: var(--green-600);
}

.info-box {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-left: 3px solid var(--green-600);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--slate-700);
  line-height: 1.7;
}
.info-box ol {
  padding-left: 16px;
  margin-top: 6px;
}
.info-box code {
  background: var(--white);
  border: 1px solid var(--slate-300);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11.5px;
}
.info-box a {
  color: var(--green-700);
  font-weight: 600;
  text-decoration: none;
}
.info-box a:hover {
  text-decoration: underline;
}
.info-box li {
  margin-bottom: 6px;
}

/* ── Form Tabs ───────────────────────────────────────────────────────────── */
.form-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--slate-200);
  padding: 0 22px;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--slate-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  flex: 1;
  justify-content: center;
}
.tab-btn:hover {
  color: var(--slate-900);
  background: var(--slate-50);
}
.tab-btn.active {
  color: var(--green-700);
  border-bottom-color: var(--green-700);
  background: var(--white);
}

.tab-btn svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}
.tab-btn.active svg {
  opacity: 1;
  color: var(--green-700);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  padding: 11px 20px;
  background: linear-gradient(90deg, var(--green-700), var(--green-600));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 4px 10px rgba(26, 92, 58, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(90deg, var(--green-800), var(--green-700));
  transform: translateY(-1px);
}
.btn-danger {
  background: var(--status-lost);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
}

/* ── Accounts List ───────────────────────────────────────────────────────── */
.account-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--slate-100);
}
.account-item:last-child {
  border-bottom: none;
}
.account-platform {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.platform-meta {
  background: #e8f0ff;
}
.platform-google {
  background: #ffe8e8;
}
.account-info {
  flex: 1;
}
.account-label {
  font-weight: 600;
  font-size: 13.5px;
}
.account-id {
  font-size: 11.5px;
  color: var(--slate-500);
  margin-top: 2px;
}

/* ── Team List ───────────────────────────────────────────────────────────── */
.team-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--slate-100);
}
.team-item:last-child {
  border-bottom: none;
}
.team-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--saffron));
  color: white;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.team-info {
  flex: 1;
}
.team-name {
  font-weight: 600;
  font-size: 13.5px;
}
.team-email {
  font-size: 11.5px;
  color: var(--slate-500);
}
.team-role {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--green-100);
  color: var(--green-700);
  font-weight: 600;
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.hidden {
  display: none;
}

.modal {
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate-100);
  background: linear-gradient(90deg, var(--green-900), var(--green-800));
}
.modal-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  color: white;
  font-weight: 600;
}
.modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.modal-body {
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Modal sections */
.modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green-700);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--green-100);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.info-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.info-field .if-label {
  font-size: 11px;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.info-field .if-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-900);
}
.info-field .if-value.big {
  font-size: 20px;
  font-weight: 700;
  color: var(--green-700);
}

/* Modal actions */
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-actions select {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid var(--slate-300);
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  outline: none;
  background: var(--white);
  cursor: pointer;
}
.modal-actions select:focus {
  border-color: var(--green-600);
}
.modal-actions .btn-primary {
  flex: 1;
}

/* Notes */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-item {
  background: var(--slate-50);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}
.note-meta {
  font-size: 11px;
  color: var(--slate-500);
  margin-top: 4px;
}

.note-form {
  display: flex;
  gap: 8px;
}
.note-form textarea {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--slate-300);
  border-radius: 8px;
  font-size: 13.5px;
  resize: none;
  outline: none;
  font-family: inherit;
  min-height: 60px;
}
.note-form textarea:focus {
  border-color: var(--green-600);
}
.note-form button {
  align-self: flex-end;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--green-900);
  color: white;
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 999;
  max-width: 360px;
  border-left: 4px solid var(--saffron);
  animation: slideIn 0.25s ease;
}
.toast.hidden {
  display: none;
}
.toast.error {
  border-left-color: var(--status-lost);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Misc ────────────────────────────────────────────────────────────────── */
.link-sm {
  font-size: 12.5px;
  color: var(--saffron);
  text-decoration: none;
  font-weight: 500;
}
.link-sm:hover {
  text-decoration: underline;
}
.hidden {
  display: none !important;
}
.text-center {
  text-align: center;
}
.text-muted {
  color: var(--slate-500);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  :root {
    --sidebar-w: 240px;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: var(--sidebar-w);
    display: flex;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .menu-toggle,
  .menu-close {
    display: flex;
  }
  .main-content {
    margin-left: 0;
  }
  .topbar {
    padding: 12px 16px;
  }
  .topbar-date {
    display: none;
  }
  .view {
    padding: 16px;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .page-title {
    font-size: 18px;
  }
  /* Leads Table Responsiveness */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
  }
  table {
    min-width: 800px; /* Force scroll instead of squishing */
  }
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .filter-group {
    flex-wrap: wrap;
  }
  .search-box {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
