@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700&display=swap");

:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2f6fed;
  --primary-dark: #1f5bd6;
  --danger: #ef4444;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

* { box-sizing: border-box; }

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
}

body[data-page="login"] {
  background:
    radial-gradient(circle at top, rgba(120, 150, 255, 0.22), transparent 40%),
    radial-gradient(circle at 20% 10%, rgba(186, 200, 255, 0.25), transparent 45%),
    linear-gradient(180deg, #f5f7ff 0%, #f8fafc 45%, #ffffff 100%);
}

body[data-page="login"] .app-shell {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

body[data-page="login"] .content {
  margin-left: 0;
  padding: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-page {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: radial-gradient(circle at top, rgba(47, 111, 237, 0.08), transparent 45%);
}

.auth-shell {
  width: min(520px, 100%);
}

.auth-card {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow:
    0 30px 70px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
}

.auth-brand {
  display: flex;
  justify-content: center;
}

.auth-brand img {
  width: 180px;
  height: auto;
}

.auth-title {
  text-align: center;
}

.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.auth-title h1 {
  font-size: 26px;
  font-weight: 700;
}

.auth-title p {
  color: var(--muted);
  margin: 0;
}

.auth-link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-note {
  color: var(--muted);
}

.auth-input .input-group-text {
  background: transparent;
  border: none;
  color: #64748b;
}

.auth-input .form-control {
  border: none;
  background: transparent !important;
}

.auth-input .form-control:-webkit-autofill,
.auth-input .form-control:-webkit-autofill:hover,
.auth-input .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: inherit;
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 9999s ease-in-out 0s;
}

.auth-input .form-control:focus {
  box-shadow: none;
}

.auth-input:focus-within .input-group-text {
  color: #1f3a8a;
}

.auth-input:focus-within .form-control {
  box-shadow: none;
}

.auth-input {
  border-radius: 16px;
  padding: 2px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.auth-input:focus-within {
  border-color: rgba(120, 150, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(120, 150, 255, 0.2);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease;
}

.sidebar-close {
  display: none;
  align-self: flex-end;
  border-radius: 12px;
  padding: 6px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  margin-top: 18px;
  margin-bottom: 16px;
}

.brand-logo {
  width: 210px;
  height: auto;
  margin-left: -6px;
}

.brand-title {
  font-size: 16px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
}

.sidebar .btn-new {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 16px;
  padding: 12px 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(180deg, #3b82f6 0%, #1d4ed8 45%, #0b5ed7 100%);
  border: 1px solid rgba(59, 130, 246, 0.55);
  color: #ffffff;
  box-shadow:
    0 16px 28px rgba(29, 78, 216, 0.35),
    0 6px 14px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  letter-spacing: 0.2px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-transform: none;
  font-size: 13px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sidebar .btn-new::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.15) 40%, transparent 60%);
  opacity: 0.7;
  transform: translateY(-1px);
  z-index: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.sidebar .btn-new::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
  z-index: 0;
}

.sidebar .btn-new__text {
  position: relative;
  z-index: 1;
  padding-left: 0;
}

.sidebar .btn-new:hover {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.45), transparent 55%),
    linear-gradient(180deg, #4f8dff 0%, #2563eb 45%, #0b5ed7 100%);
  border-color: rgba(96, 165, 250, 0.7);
  color: #ffffff;
  box-shadow:
    0 20px 34px rgba(37, 99, 235, 0.4),
    0 8px 18px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.sidebar .btn-new:hover::before {
  opacity: 0.9;
  transform: translateY(0);
}

.sidebar .btn-new:active {
  transform: translateY(0);
  box-shadow:
    0 12px 20px rgba(29, 78, 216, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.menu {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  position: relative;
}

.menu-glass {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 0;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  opacity: 0;
  transition: top 0.2s ease, height 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
  z-index: 0;
}

.menu-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 35%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 55%),
    radial-gradient(circle at 80% 65%, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0) 50%);
  opacity: 0.8;
  filter: blur(6px);
}

.menu-glass::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  opacity: 0.7;
}

.menu.has-glass .menu-glass {
  opacity: 1;
}

.menu-link {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  isolation: isolate;
  border: 1px solid transparent;
  z-index: 1;
}

.menu-link.active,
.menu-link:hover {
  color: var(--primary);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.menu-link i {
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, color 0.18s ease;
}

.menu-link.active i,
.menu-link:hover i {
  transform: scale(1.05);
}

.menu-link.logout-link,
.menu-link.logout-link:hover {
  background: transparent;
}

.menu-link.logout-link {
  overflow: hidden;
}

.menu-link.logout-link:hover {
  color: #ef4444;
}

.menu-link.logout-link:hover i {
  color: #ef4444;
}

.menu-link.logout-link::after {
  content: "";
  position: absolute;
  inset: 6px 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 35%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 60%),
    radial-gradient(circle at 80% 65%, rgba(248, 113, 113, 0.12), rgba(248, 113, 113, 0) 65%);
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.menu-link.logout-link:hover::after {
  opacity: 1;
}

.logout-form {
  width: 100%;
}

.logout-form .menu-link {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
}

.sidebar-footer {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.content {
  margin-left: 250px;
  padding: 34px 30px 40px;
  flex: 1;
}

.app-shell.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

.app-shell.sidebar-collapsed .content {
  margin-left: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.topbar-title {
  font-size: 20px;
  font-weight: 600;
}

.page-head h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 0;
}

.page-head p {
  color: var(--muted);
  margin-top: 2px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

.stat-card {
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
}

.stat-icon.blue { background: #dbe7ff; color: #2f6fed; }
.stat-icon.red { background: #fde2e2; color: #ef4444; }
.stat-icon.gray { background: #f3f4f6; color: #6b7280; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }

.stat-value { font-size: 20px; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 13px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 14px;
}

.chip {
  background: #ffecec;
  color: #ef4444;
  font-weight: 600;
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 8px;
}

.section-title--danger {
  align-items: center;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.section-badge.danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.lead-list { display: grid; gap: 14px; }

.lead-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  position: relative;
}

.lead-card.overdue::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: var(--danger);
}

.lead-title { font-weight: 600; }
.lead-tags { display: flex; gap: 6px; margin: 6px 0; }

.pill {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.pill.blue { background: #e7efff; color: #2f6fed; }
.pill.gray { background: #f3f4f6; color: #6b7280; }
.pill.orange { background: #ffedd5; color: #d97706; }
.pill.green { background: #dcfce7; color: #15803d; }
.pill.red { background: #ffe4e6; color: #be123c; }

.lead-meta { color: #ef4444; font-size: 13px; }
.lead-sub { color: var(--muted); font-size: 13px; }
.lead-contact { font-size: 12px; color: var(--muted); font-style: italic; margin: -2px 0 4px; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #334155;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 4px 10px;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.contact-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--primary);
  box-shadow:
    0 14px 26px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.contact-btn .bi-whatsapp {
  color: #16a34a;
}

.icon-btn {
  border: none;
  background: transparent;
  color: #2f6fed;
  font-size: 18px;
  text-decoration: none;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 20px;
}

.search-box {
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.search-box input {
  border: none;
  outline: none;
  width: 100%;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.leads-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(148, 163, 184, 0.3);
}

.leads-head {
  gap: 12px;
  align-items: center;
  flex-direction: row;
}

.leads-head__intro {
  flex: 1;
}

.leads-view-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.leads-view-toggle .btn.is-active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
}

.leads-table-wrap {
  width: 100%;
  overflow: visible;
}

.leads-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  overflow: visible;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.leads-table thead th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.8));
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.leads-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  vertical-align: middle;
}

.leads-table tbody td.leads-table-actions {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  overflow: visible;
}

.leads-table .pill {
  white-space: nowrap;
}

.leads-table tbody tr:hover {
  background: rgba(238, 242, 255, 0.45);
}

.leads-table tbody tr:last-child td {
  border-bottom: 0;
}

.lead-table-title {
  font-weight: 600;
}

.leads-meta {
  font-size: 12px;
  color: var(--muted);
}

.leads-note {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #475569;
}

.leads-table-actions-head,
.leads-table-actions {
  width: 88px;
  white-space: nowrap;
  text-align: center;
}

.leads-table-actions {
  vertical-align: middle;
  position: relative;
  overflow: visible;
}

.row-actions-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.row-actions-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.row-actions-toggle:hover {
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--primary);
  background: rgba(255, 255, 255, 0.9);
}

.row-actions-toggle:focus {
  outline: 0;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.2),
    0 8px 18px rgba(15, 23, 42, 0.08);
}

.row-actions-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1200;
  min-width: 150px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.row-actions-dropdown.is-open .row-actions-menu {
  display: flex;
}

.row-actions-dropdown:focus-within .row-actions-menu {
  display: flex;
}

.row-actions-menu .btn-link {
  display: block;
  padding: 6px 10px;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  margin: 0;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.row-actions-menu .btn-link:hover {
  border-color: rgba(99, 102, 241, 0.28);
  background: rgba(238, 242, 255, 0.65);
  transform: none;
  box-shadow: none;
}

.row-actions-menu .btn-link.text-danger {
  border-color: transparent;
  background: transparent;
}

.row-actions-menu .btn-link.text-danger:hover {
  border-color: rgba(244, 63, 94, 0.28);
  background: rgba(255, 241, 242, 0.75);
}

.leads-toolbar {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 16px;
  padding: 12px;
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.leads-toolbar .toolbar-row {
  margin: 0;
}

.leads-card .filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.leads-card .filter-group {
  flex: 1 1 200px;
}

.leads-card .filter-group--wide {
  flex: 2 1 420px;
}

.leads-card .filter-btn {
  flex: 0 0 160px;
  align-self: flex-end;
}

.leads-card .filter-btn {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 0 auto;
}


.empty-state {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.calendar-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(148, 163, 184, 0.3);
}

.calendar-head {
  gap: 12px;
  align-items: flex-start;
  flex-direction: column;
}

.calendar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.calendar-title {
  font-weight: 600;
  min-width: 160px;
  text-align: center;
}

.calendar-scroll {
  margin-top: 12px;
  overflow: visible;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 10px;
  min-width: 0;
}

.calendar-day { text-align: center; color: var(--muted); font-weight: 600; }

.calendar-cell {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  min-height: 92px;
  padding: 10px;
  font-size: 12px;
  overflow: visible;
  box-shadow:
    0 10px 18px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.calendar-cell.muted { color: #9ca3af; }

.calendar-cell.today { border: 2px solid var(--primary); }

.calendar-event {
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 11px;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 2px;
  line-height: 1.2;
}

.calendar-event.blue { background: #e7efff; color: #2f6fed; border-color: #c7d2fe; }
.calendar-event.red { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }

.calendar-event-title {
  font-weight: 600;
}

.calendar-event-sub {
  font-size: 10px;
  opacity: 0.85;
}

.calendar-extra {
  display: none;
  margin-top: 6px;
}

.calendar-cell.expanded .calendar-extra {
  display: block;
}

.calendar-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 220px;
  max-width: 260px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  z-index: 20;
}

.calendar-event:hover .calendar-tooltip,
.calendar-event:focus .calendar-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.calendar-tooltip-title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.calendar-tooltip-detail {
  color: #475569;
  font-size: 11px;
  line-height: 1.4;
}

.calendar-tooltip-date {
  margin-top: 6px;
  font-size: 10px;
  color: #94a3b8;
}

.calendar-more {
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 3px 6px;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 11px;
  color: #475569;
}

.calendar-more:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
}

.kpi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.kpi-card.productivity {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(148, 163, 184, 0.3);
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.kpi-card.productivity .kpi-head {
  gap: 12px;
  align-items: flex-start;
  flex-direction: column;
}

.kpi-card.productivity .kpi-head h3 {
  width: 100%;
  text-align: center;
}

.kpi-card.productivity .kpi-filter-bar {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.kpi-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.hero-card {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  padding: 16px;
  box-shadow:
    0 16px 28px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-card.primary {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(180deg, #4f8dff 0%, #2563eb 45%, #0b5ed7 100%);
  border-color: rgba(96, 165, 250, 0.65);
  color: #ffffff;
  box-shadow:
    0 20px 36px rgba(37, 99, 235, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hero-card.accent-green {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(180deg, #34c759 0%, #22c55e 45%, #16a34a 100%);
  border-color: rgba(74, 222, 128, 0.55);
  color: #ffffff;
  box-shadow:
    0 20px 36px rgba(22, 163, 74, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hero-card.accent-green .hero-sub {
  color: rgba(240, 255, 245, 0.95);
  text-shadow: 0 1px 6px rgba(15, 23, 42, 0.35);
}

.hero-card.accent-green .hero-label {
  opacity: 0.9;
}

.hero-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  opacity: 0.8;
}

.hero-value {
  font-size: 30px;
  font-weight: 700;
  margin: 6px 0 4px;
}

.hero-sub {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.7);
}

.hero-card.primary .hero-sub {
  color: rgba(255, 255, 255, 0.85);
}

.kpi-section {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.kpi-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.kpi-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.kpi-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.kpi-section-head .kpi-section-title {
  margin-bottom: 0;
}

.kpi-summary--compact {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.summary-card--soft {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow:
    0 10px 20px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.kpi-stats--compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.kpi-split {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.kpi-subsection {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.kpi-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.kpi-visual {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-color: rgba(148, 163, 184, 0.3);
}

.kpi-visual .kpi-head {
  gap: 12px;
  align-items: flex-start;
  flex-direction: column;
}

.kpi-visual .kpi-filter-bar {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.kpi-visual-body {
  margin-top: 10px;
}

.kpi-visual-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.kpi-visual-field {
  min-width: 220px;
}

.kpi-visual-field label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.kpi-visual-field .form-select {
  height: 36px;
}

.kpi-visual-compare {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-visual .btn.is-active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
}

.kpi-chart-wrap {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  padding: 16px;
  box-shadow:
    0 16px 28px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  min-height: 260px;
}

.kpi-chart-wrap canvas {
  width: 100% !important;
  height: 220px !important;
}

.kpi-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.kpi-range {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.kpi-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.kpi-range-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.kpi-range-compact span {
  color: var(--muted);
  font-size: 12px;
}

.kpi-range-compact > div {
  display: flex;
  align-items: center;
}

.kpi-range-compact .btn {
  margin-top: 0;
}

.kpi-range-compact label {
  margin-bottom: 0;
}

.kpi-quick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-quick .btn {
  white-space: nowrap;
}

.kpi-quick .btn,
.kpi-range-compact .btn {
  transition: all 0.2s ease;
}

.kpi-quick .btn,
.kpi-range-compact .btn,
.kpi-range-compact .form-control {
  height: 40px;
}

.kpi-filter-bar .btn,
.kpi-filter-bar .form-control {
  height: 40px;
}

.kpi-quick .btn {
  display: inline-flex;
  align-items: center;
}

.kpi-quick .btn:hover,
.kpi-range-compact .btn:hover {
  border-color: #c7d2fe;
  color: var(--primary);
  background: #eef2ff;
}

.kpi-quick .btn:focus,
.kpi-range-compact .btn:focus {
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}

.kpi-range-compact .form-control {
  min-width: 150px;
}

.kpi-range-compact .form-control:focus {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

@media (max-width: 768px) {
  .kpi-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .kpi-quick,
  .kpi-range-compact {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .kpi-visual-field {
    min-width: 100%;
  }

  .kpi-visual-compare {
    width: 100%;
    justify-content: flex-start;
  }
}

.kpi-range label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.kpi-range-compact label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.kpi-day-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.kpi-day {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

.kpi-day-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.kpi-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.kpi-day-grid span {
  color: var(--muted);
  font-size: 12px;
}

.kpi-day-grid strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.kpi-readonly {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text);
}

.kpi-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.summary-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.summary-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
}

.summary-icon.blue { background: #e7efff; color: #2f6fed; }
.summary-icon.green { background: #dcfce7; color: #16a34a; }

.summary-value { font-size: 20px; font-weight: 700; }
.summary-label { color: var(--muted); font-size: 12px; }

.kpi-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.mini-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.mini-title { color: var(--muted); font-size: 12px; }
.mini-value { font-size: 22px; font-weight: 700; }
.mini-value.green { color: #16a34a; }
.mini-value.red { color: #ef4444; }

.progress-list { display: grid; gap: 10px; }
.progress-item { display: grid; grid-template-columns: 140px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }

@media (max-width: 992px) {
  .sidebar { position: fixed; transform: translateX(-100%); z-index: 1000; }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; }
  .sidebar-close { display: inline-flex; }
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "summary"
      "actions"
      "trend"
      "overdue"
      "today";
  }
}

@media (max-width: 1200px) {
  .dashboard-filters .filter-bar {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .toolbar-row { flex-direction: column; align-items: stretch; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .calendar-header { flex-wrap: wrap; justify-content: center; }
  .calendar-title { min-width: 120px; }
  .calendar-grid { grid-template-columns: 1fr; }
  .calendar-day { display: none; }
  .calendar-cell {
    min-height: auto;
    padding: 12px;
    font-size: 12px;
    display: grid;
    gap: 6px;
  }
  .calendar-cell > div:first-child {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
  }
  .calendar-event { font-size: 11px; }
  .filter-btn {
    width: 160px;
    justify-self: center;
    align-self: center;
    margin: 0 auto;
    display: block;
    grid-column: 1 / -1;
  }
  .dashboard-filters .filter-btn,
  .leads-card .filter-btn {
    justify-self: start;
    align-self: start;
    margin: 0;
  }
  .filter-bar,
  .filter-bar--extended { grid-template-columns: 1fr; }
  .filter-group { min-width: 0; width: 100%; }
  .filter-group .form-select,
  .filter-group .form-control { width: 100%; }
  .filter-range { grid-template-columns: 1fr; gap: 6px; }
  .filter-range input { width: 100%; min-width: 0; }
  .filter-range span {
    display: block;
    justify-self: center;
    color: var(--muted);
    font-size: 12px;
  }
  .filter-group--wide {
    grid-column: span 1;
  }
  .leads-toolbar .toolbar-actions { justify-content: flex-start; flex-wrap: wrap; }
  .leads-toolbar .form-select { flex: 1; min-width: 160px; }
  .leads-card .filter-bar { flex-direction: column; }
  .leads-card .filter-group,
  .leads-card .filter-group--wide,
  .leads-card .filter-btn { flex: 1 1 auto; }
  .leads-head { flex-direction: column; align-items: flex-start; }
  .leads-view-toggle { width: 100%; }
  .leads-view-toggle .btn { flex: 1 1 auto; }
  .lead-card { flex-direction: column; align-items: stretch; }
  .lead-actions { flex-wrap: wrap; }
  .call-link { align-self: flex-end; }
}

@media (max-width: 520px) {
  .calendar-header { justify-content: space-between; }
}
.section-block {
  margin-bottom: 22px;
}

.section-title.icon-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.section-title.icon-title i {
  color: var(--primary);
}

.chip.blue {
  background: #e7efff;
  color: var(--primary);
}

.chip.gray {
  background: #f3f4f6;
  color: #6b7280;
}

.lead-card.today::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: var(--primary);
}

.lead-meta.blue {
  color: var(--primary);
}
.modal-content {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.modal-header {
  border-bottom: none;
  padding-bottom: 6px;
}

.modal-title {
  font-weight: 650;
  letter-spacing: 0.2px;
}

.modal-footer {
  border-top: none;
  padding-top: 6px;
}

.modal .modal-form .form-control,
.modal .modal-form .form-select {
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.modal .modal-form .form-control:focus,
.modal .modal-form .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.form-section {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f9fafb;
  margin-bottom: 12px;
}

.modal .form-section {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.form-section-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.duration-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.duration-field .form-control {
  flex: 1;
  min-width: 160px;
}

.duration-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  align-items: end;
}

.filter-bar--extended {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.filter-group label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.filter-group {
  min-width: 0;
}

.filter-group .form-select,
.filter-group .form-control {
  width: 100%;
  min-width: 0;
}

.filter-group--wide {
  grid-column: span 2;
}

.filter-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  width: 100%;
}

.filter-range input {
  min-width: 0;
  width: 100%;
}

.filter-btn {
  height: 42px;
  width: 160px;
  align-self: end;
  justify-self: end;
}

.dashboard-filters {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(148, 163, 184, 0.3);
}

.dashboard-filters .filter-bar {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 0;
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dashboard-summary {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(148, 163, 184, 0.3);
}

.dashboard-summary .stats-row {
  margin: 0;
}

.dashboard-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(148, 163, 184, 0.3);
}

.dashboard-section .section-title {
  margin: 0 0 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "summary summary"
    "trend trend"
    "overdue today";
  gap: 16px;
}

.dashboard-kpis { grid-area: summary; }
.dashboard-trend { grid-area: trend; }
.dashboard-overdue { grid-area: overdue; }
.dashboard-today { grid-area: today; }

.dashboard-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-chart {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  padding: 14px;
  box-shadow:
    0 16px 28px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  min-height: 220px;
}

.dashboard-chart canvas {
  width: 100% !important;
  height: 180px !important;
}

.dashboard-filters .kpi-head,
.dashboard-summary .kpi-head,
.dashboard-section .section-title {
  justify-content: center;
  text-align: center;
}

.dashboard-filters .kpi-head > div,
.dashboard-summary .kpi-head > div {
  width: 100%;
}

.dashboard-section .section-title {
  width: 100%;
}
.settings-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(148, 163, 184, 0.3);
}

.settings-form {
  max-width: 520px;
}

.settings-form .form-control {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.settings-form .form-control:focus {
  border-color: rgba(120, 150, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(120, 150, 255, 0.18);
}

.settings-form .input-group {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.settings-form .input-group .form-control {
  border: none;
  box-shadow: none;
}

.settings-form .input-group .btn {
  border: none;
  background: transparent;
  color: #64748b;
}

.settings-form .input-group:focus-within {
  border-color: rgba(120, 150, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(120, 150, 255, 0.18);
}

.settings-form .input-group:focus-within .btn {
  color: #1f3a8a;
}

.settings-shell {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-side {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.settings-tips {
  display: grid;
  gap: 12px;
}

.settings-tip {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.settings-tip-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e7efff;
  color: #2f6fed;
}

.settings-tip-title {
  font-weight: 600;
}

.settings-tip-sub {
  font-size: 12px;
  color: var(--muted);
}

.settings-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #334155;
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 768px) {
  .settings-form {
    max-width: 100%;
  }
  .settings-shell {
    grid-template-columns: 1fr;
  }
}

.filter-bar--extended .filter-btn {
  grid-column: 1 / -1;
}

.lead-actions {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.lead-actions .btn-link,
.history-actions .btn-link,
.leads-table-actions .btn-link {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #334155;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.lead-actions .btn-link:hover,
.history-actions .btn-link:hover,
.leads-table-actions .btn-link:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary);
  box-shadow:
    0 14px 26px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.lead-actions .btn-link.text-danger,
.history-actions .btn-link.text-danger,
.leads-table-actions .btn-link.text-danger {
  color: #e11d48;
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(255, 255, 255, 0.7);
}

.lead-actions .btn-link.text-danger:hover,
.history-actions .btn-link.text-danger:hover,
.leads-table-actions .btn-link.text-danger:hover {
  background: rgba(255, 241, 242, 0.85);
  border-color: rgba(244, 63, 94, 0.45);
  color: #be123c;
  box-shadow:
    0 14px 26px rgba(244, 63, 94, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 8px 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.btn-sm {
  padding: 6px 12px;
  border-radius: 10px;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-secondary {
  border-color: #d1d5db;
  color: #475569;
  background: #fff;
}

.btn-outline-secondary:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
}

.btn-light {
  background: #f8fafc;
  border-color: #e5e7eb;
  color: #334155;
}

.btn-light:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
}

.btn-group {
  gap: 8px;
}

.btn-group .btn {
  border-radius: 10px !important;
  box-shadow: none;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.table-footer .pagination {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.table-footer .pagination .btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #334155;
  box-shadow: none;
}

.table-footer .pagination .btn:hover {
  background: rgba(47, 111, 237, 0.12);
  color: var(--primary);
}

.table-footer .pagination .btn:focus {
  box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.25);
}

.lead-actions .btn-link {
  padding: 5px 10px;
  color: #334155;
}

.call-lead {
  font-weight: 600;
  margin-bottom: 12px;
}

.call-phone {
  color: var(--muted);
  font-size: 13px;
  margin-top: -8px;
  margin-bottom: 12px;
}

.history-list {
  display: grid;
  gap: 16px;
}

.history-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
}

.history-body {
  display: grid;
  gap: 4px;
}

.history-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
}

.history-item--call .history-dot {
  background: #2563eb;
}

.history-item--email .history-dot {
  background: #16a34a;
}

.history-item--note .history-dot {
  background: #94a3b8;
}

.history-title {
  font-weight: 600;
}

.history-meta {
  color: var(--muted);
  font-size: 12px;
}

.history-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.history-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.email-sender-popover {
  position: absolute;
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.18);
  z-index: 1100;
  display: none;
}

.email-sender-popover.is-visible {
  display: block;
}

.email-sender-popover__label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.email-sender-popover__row {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.email-sender-popover__add {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.email-sender-popover__input {
  min-width: 0;
}

.email-sender-popover__actions {
  display: flex;
  justify-content: flex-end;
}

.history-pill--action {
  background: #e7efff;
  color: var(--primary);
  border-color: #c7d2fe;
}

.history-pill--state {
  background: #f8fafc;
  color: #0f172a;
}

.history-pill--interest {
  background: #ecfeff;
  color: #0e7490;
  border-color: #bae6fd;
}

.history-pill--priority {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.history-note {
  color: var(--text);
  font-size: 13px;
}

.history-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.history-detail {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  color: #334155;
}

.history-detail span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.history-detail strong {
  font-weight: 600;
  color: var(--text);
}

.history-actions {
  margin-top: 6px;
}

.history-tabs {
  margin: 10px 0 16px;
  border-bottom: 1px solid var(--border);
}

.history-tabs .nav-link {
  border: none;
  color: var(--muted);
  font-weight: 600;
}

.history-tabs .nav-link.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.history-content {
  padding-top: 6px;
}

.history-filters {
  margin: 10px 0 16px;
}

.history-filter {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-filter:hover {
  border-color: #cbd5f5;
  color: var(--primary);
  background: #f8fafc;
}

.history-filter.active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.option-pill input {
  accent-color: var(--primary);
}

.history-day {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.history-day-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}
