body {
  background-color: #f5f5f5;
}

main {
  padding-top: 40px;
  padding-bottom: 60px;
}

/* =======================
   ORG SETUP BACKDROP & MODAL
======================= */
/* =======================
   ORG SETUP BACKDROP & MODAL
======================= */
/* Deprecated: Used Bootstrap Modal */

/* =======================
   MODERN NAVBAR (Glassmorphism)
======================= */
.glass-nav {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 0;
  z-index: 1030;
}

.navbar-logo-modern {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.15);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-logo-modern img {
  mix-blend-mode: multiply;
  /* Keep mix-blend-mode: multiply to hide white backgrounds on light themes. */
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.navbar-logo-modern:hover {
  border-color: rgba(14, 165, 233, 0.6);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
}

.nav-link-modern {
  color: #4b5563 !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px !important;
  border-radius: 10px;
  transition: all 0.2s ease;
}

/* =======================
   LOGGED-IN USER PILL (Navbar)
======================= */
.nav-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 40px;
  padding: 4px 6px 4px 4px;
  box-shadow: 0 2px 12px rgba(14, 165, 233, 0.1);
  transition: box-shadow 0.2s ease;
  flex-shrink: 0;
}

.nav-user-pill:hover {
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.18);
}

.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.nav-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  gap: 1px;
}

.nav-user-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  line-height: 1.2;
}

.nav-user-role-badge {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 7px;
  border-radius: 20px;
  display: block;
  text-align: center;
  line-height: 1.4;
}

.role-owner {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.role-manager {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.2);
}

/* Logout icon button inside user pill */
.nav-logout-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.07);
  color: #ef4444;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.nav-logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  transform: scale(1.08);
}

/* =======================
   NAVBAR NAV LINKS — CENTERED
======================= */
.navbar-nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
}

/* =======================
   LANGUAGE DROPDOWN
======================= */
.lang-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
}

.lang-dropdown-btn:hover,
.lang-dropdown-btn.show {
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.35);
}

.lang-dropdown-btn::after,
.lang-dropdown-btn.dropdown-toggle::after {
  display: none !important;
}

.lang-dropdown-menu {
  min-width: 90px;
  border-radius: 14px;
  border: 1px solid rgba(14, 165, 233, 0.15);
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.12);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px;
  overflow: hidden;
}

.lang-dropdown-item {
  background: none;
  border: none;
  width: 100%;
  text-align: center;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #374151;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  display: block;
}

.lang-dropdown-item:hover {
  background: transparent;
  color: #0ea5e9;
  font-weight: 600;
}

.lang-dropdown-item.active {
  background: transparent;
  color: #0284c7;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* =======================
   SNOWY ICE EFFECT
======================= */
.snowy-ice-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.snowy-ice {
  position: relative;
  display: inline-block;
  color: #0ea5e9;
  text-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
  z-index: 2;
  font-weight: 800;
  transition: all 0.3s ease;
}

/* The snow 'cap' on top of letters */
.snowy-ice::before {
  content: attr(data-text);
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  color: #fff;
  text-shadow: 0 0 2px #fff, 0 0 5px rgba(255, 255, 255, 0.8);
  clip-path: polygon(0% 0%, 100% 0%, 100% 35%, 85% 30%, 70% 40%, 55% 25%, 40% 45%, 25% 30%, 10% 40%, 0% 25%);
  z-index: 3;
  pointer-events: none;
}

.flake {
  position: absolute;
  top: -5px;
  color: #fff;
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  text-shadow: 0 0 3px rgba(14, 165, 233, 0.5);
}

.flake-1 {
  left: 10%;
  animation: snow-fall-fixed 3s linear infinite;
}

.flake-2 {
  left: 45%;
  animation: snow-fall-fixed 4s linear infinite 0.5s;
}

.flake-3 {
  left: 80%;
  animation: snow-fall-fixed 3.5s linear infinite 1.2s;
}

@keyframes snow-fall-fixed {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    transform: translateY(35px) translateX(15px) rotate(360deg);
    opacity: 0;
  }
}

/* =======================
   FULL CIRCLE SNOW
   ======================= */
.circle-snow-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.circle-snow-container .flake {
  position: absolute;
  top: -15px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  text-shadow: 0 0 3px rgba(14, 165, 233, 0.5);
  display: inline-block !important;
}

.circle-snow-container .flake-1 {
  left: 10%;
  animation: snow-fall-full 5s linear infinite;
}

.circle-snow-container .flake-2 {
  left: 45%;
  animation: snow-fall-full 4.2s linear infinite 0.5s;
}

.circle-snow-container .flake-3 {
  left: 80%;
  animation: snow-fall-full 4.8s linear infinite 1.2s;
}

@keyframes snow-fall-full {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(145px) translateX(20px) rotate(360deg);
    opacity: 0;
  }
}

.nav-link-modern:hover {
  background: rgba(13, 110, 253, 0.05);
  color: #0d6efd !important;
}

.nav-link-modern.active {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd !important;
  font-weight: 600;
}

/* Language Switcher */
.lang-switcher-glass {
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 12px;
  display: flex;
  gap: 2px;
}

.lang-btn-modern {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.lang-btn-modern:hover {
  color: #111827;
}

.lang-btn-modern.active {
  background: white;
  color: #0d6efd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* User Profile */
.user-avatar-mini {
  width: 28px;
  height: 28px;
  background: #f3f4f6;
  color: #9ca3af;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* Glass Buttons */
.btn-primary-glass {
  background: #0d6efd;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  padding: 10px 24px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.3);
}

.btn-primary-glass:hover {
  background: #0b5ed7;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 110, 253, 0.4);
}

.btn-outline-danger-glass {
  background: rgba(220, 53, 69, 0.05);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.1);
  border-radius: 12px;
  font-weight: 600;
  padding: 8px 20px;
  transition: all 0.2s ease;
}

.btn-outline-danger-glass:hover {
  background: #dc3545;
  color: white;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

/* Modern Rounded Buttons */
.btn-modern {
  border-radius: 14px;
  font-weight: 600;
  padding: 10px 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  font-size: 0.95rem;
}

.btn-modern:hover {
  transform: translateY(-2px);
}

.btn-modern:active {
  transform: translateY(0);
}

.btn-modern:disabled {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  transform: none !important;
}

.btn-modern-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #0099ff 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.25);
}

.btn-modern-primary:hover {
  background: linear-gradient(135deg, #0b5ed7 0%, #0088ee 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(13, 110, 253, 0.35);
}

.btn-modern-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.btn-modern-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

/* Google Sheets import button */
.btn-modern-gsheet {
  background: linear-gradient(135deg, #34a853 0%, #1a8a3a 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(52, 168, 83, 0.25);
}

.btn-modern-gsheet:hover {
  background: linear-gradient(135deg, #2d9247 0%, #157a30 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(52, 168, 83, 0.38);
}

.btn-modern-lg {
  padding: 12px 32px;
  font-size: 1.05rem;
}

/* Clear Filters Hover Effect */
.btn-hover-clear {
  transition: all 0.2s ease !important;
  color: #adb5bd !important;
  padding: 6px 12px !important;
  border-radius: 10px !important;
}

.btn-hover-clear:hover {
  color: #ef4444 !important;
  /* Soft red for "clear" action */
  background: rgba(239, 68, 68, 0.08) !important;
  text-decoration: none !important;
}


/* =======================
   UPLOAD (Drag & Drop)
======================= */
#upload-section {
  margin-top: 40px;
}

#drop-area {
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  background-color: #fff;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#drop-area.dragover {
  border-color: #4a90e2;
  background-color: #f0f7ff;
  transform: scale(1.01);
}

.custom-icon-wrapper {
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.1);
  transition: all 0.3s ease;
}

.rounded-4 {
  border-radius: 1rem !important;
}

.upload-icon-pulse {
  display: inline-block;
  animation: pulse-shadow 2s infinite;
  border-radius: 50%;
}

@keyframes pulse-shadow {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(13, 110, 253, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

.btn-pulsating {
  animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

.preview-table-wrapper {
  max-height: 500px;
  overflow: auto !important;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.preview-table-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.preview-table-wrapper::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 10px;
}

.preview-table-modern {
  margin-bottom: 0;
}

.preview-table-modern th {
  background-color: #ffffff !important;
  color: #64748b;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 14px 12px !important;
}

.preview-table-modern td {
  font-size: 0.82rem;
  color: #334155;
  padding: 12px 12px !important;
  border-bottom: 1px solid #f8fafc;
}

.preview-table-modern .text-truncate {
  max-width: 140px;
}

.preview-table-wrapper td {
  font-size: 0.85rem;
  color: #4b5563;
  padding: 10px 12px !important;
}

.view-template-link {
  color: #0d6efd;
  text-decoration: underline;
  cursor: pointer;
}

.custom-icon-wrapper:hover {
  transform: rotate(5deg) scale(1.1);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15) !important;
}

.transition-all {
  transition: all 0.3s ease;
}

/* =======================
   TABLE SECTION
======================= */
#table-section {
  margin-top: 20px;
  display: none;
  /* hidden before file upload */
}

/* =======================
   DASHBOARD STATS (Modern Stacked Circles)
======================= */
.stat-circles-stack {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  flex-wrap: nowrap;
}

.stat-circle-modern {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-left: -25px;
  /* Reduced overlap for better visibility */
  border: 5px solid #f8fafc;
  z-index: 1;
  cursor: pointer;
}

.stat-circle-modern:first-child {
  margin-left: 0;
}

.stat-circle-modern:hover {
  transform: scale(1.15) translateY(-5px);
  z-index: 10 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.stat-circle-modern .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-circle-modern .stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
}

/* Specific Z-index for stacking order (optional but helps) */
.stat-circle-modern:nth-child(1) {
  z-index: 6;
}

.stat-circle-modern:nth-child(2) {
  z-index: 5;
}

.stat-circle-modern:nth-child(3) {
  z-index: 4;
}

.stat-circle-modern:nth-child(4) {
  z-index: 3;
}

.stat-circle-modern:nth-child(5) {
  z-index: 2;
}

.stat-circle-modern:nth-child(6) {
  z-index: 1;
}

/* Color Variants (Rings) */
.stat-circle-modern.hot {
  border-color: #ff9800;
}

.stat-circle-modern.hot .stat-value {
  color: #e65100;
}

.stat-circle-modern.warm {
  border-color: #ffeb3b;
}

.stat-circle-modern.warm .stat-value {
  color: #856404;
}

.stat-circle-modern.cold {
  border-color: #0ea5e9;
}

.stat-circle-modern.cold .stat-value {
  color: #0369a1;
}

.stat-circle-modern.no-reply {
  border-color: #0ea5e9;
}

.stat-circle-modern.no-reply .stat-value {
  color: #0369a1;
}

.stat-circle-modern.manual {
  border-color: #9c27b0;
}

.stat-circle-modern.manual .stat-value {
  color: #7b1fa2;
}

.stat-circle-modern.new {
  border-color: #cbd5e1;
}

.stat-circle-modern.new .stat-value {
  color: #475569;
}

/* Main circular chart override */
.circular-chart-modern {
  display: block;
  margin: 10px auto;
  max-width: 100%;
  max-height: 250px;
  transition: all 0.3s ease;
}

.main-chart-clickable:hover .circular-chart-modern {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.main-chart-clickable:hover h1 {
  transform: scale(1.1);
  transition: all 0.3s ease;
}

.circle-bg-modern {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 2;
}

.circle-modern {
  fill: none;
  stroke: #0d6efd;
  stroke-width: 2.8;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease 0s;
}

/* =======================
   FILTERS PANEL (New)
======================= */
.filters-panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.filter-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #adb5bd;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  display: block;
}

.filter-date-group {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 4px 10px;
  gap: 8px;
  transition: all 0.2s;
}

.filter-date-group:focus-within {
  background: #fff;
  border-color: #8da2fb;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.filter-date-input {
  border: none;
  background: transparent;
  font-size: 0.85rem;
  color: #495057;
  width: 110px;
  padding: 4px 0;
  font-family: inherit;
  outline: none;
  text-align: center;
}

.filter-date-input:focus {
  outline: none;
}

.filter-divider {
  width: 1px;
  height: 24px;
  background-color: #e9ecef;
  margin: 0 16px;
}

.search-modern {
  border-radius: 12px;
  border: 1px solid #e9ecef;
  padding: 6px 16px;
  background-color: #f8f9fa;
  transition: all 0.2s;
}

.search-modern:focus-within {
  background-color: #ffffff;
  border-color: #8da2fb;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.search-modern input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 0.9rem;
  color: #495057;
}

/* =======================
   FILTERS BAR
======================= */
/* #filters-bar and related styles removed */

.filter-chip {
  padding: 4px 12px;
  border-radius: 20px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  color: #6c757d;
  transition: all 0.2s;
}

.filter-chip:hover {
  background: #e9ecef;
  color: #495057;
}

.filter-chip.active {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}





/* =======================
   ACTION BUTTONS (Import/Export)
======================= */

/* контейнер кнопок под таблицей */
.action-buttons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;

  /* вот этот разрыв от таблицы */
  margin-top: 18px;

  /* и немного “воздуха” снизу */
  margin-bottom: 40px;
}

/* общий размер кнопок */
.action-buttons .action-btn {
  height: 44px;
  min-width: 130px;
  padding: 0 22px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

/* Export: оставляем твой зелёный цвет (не трогаем) */
#export-btn {
  border: none;
  font-weight: 600;
  font-size: 1rem;
  background-color: #8afc65;
}

/* =======================
   FOOTER (если используется)
======================= */
footer {
  margin-top: 40px;
  padding: 40px 0;
  background-color: #fff;
  font-size: 0.9rem;
}

/* Send message button style (не меняет цвета Import/Export) */
#send-btn {
  border-radius: 22px;
}

/* ===== Actions row (right aligned, one line, with spacing from table) ===== */
.action-buttons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  /* отрыв от таблицы */
  padding-bottom: 40px;
  /* воздух снизу */
}

/* keep Import/Export same size */
.action-btn {
  height: 44px;
  min-width: 130px;
  padding: 0 22px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

/* ===== Message input + button (visual only) ===== */
.message-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 6px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.message-input {
  height: 32px;
  width: 340px;
  /* можно менять */
  border: none;
  outline: none;
  box-shadow: none !important;
  padding: 0 10px;
  background: transparent;
}

.message-input:focus {
  border: none;
  outline: none;
  box-shadow: none !important;
}

.message-send-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

/* =======================
   CONTACTS PAGE STYLES
======================= */

/* Filters bar for contacts page */
/* 
.filters-bar styles removed
*/

/* Status badges & Pills */
.status-badge,
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.status-dropdown-toggle {
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.status-dropdown-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.status-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  min-width: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-dropdown-toggle:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.status-dropdown-toggle::after {
  display: none;
}

/* Glassmorphism Dropdown Menu */
.glass-dropdown-menu {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 8px;
  min-width: 180px;
  z-index: 1060;

  /* Transition only for opening */
  opacity: 0;
  margin-top: 10px;
  display: block;
  visibility: hidden;
  pointer-events: none;
}

.glass-dropdown-menu.show {
  opacity: 1;
  margin-top: 5px;
  /* Subtle offset from toggle */
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease, margin-top 0.2s ease, visibility 0.2s;
}

/* Transition items */
.glass-dropdown-menu .dropdown-item {
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 12px;
  color: #4b5563;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.glass-dropdown-menu .dropdown-item:hover {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  transform: translateX(4px);
}

.glass-dropdown-menu .dropdown-item.active {
  background: #0d6efd;
  color: white;
}

/* Status Colors - Refined for better contrast */
.status-new {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.status-no-reply {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #bae6fd !important;
}

.status-sent {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #7dd3fc;
}

.status-replied {
  background: #ecfdf5;
  color: #047857;
  border-color: #6ee7b7;
}

.status-warm {
  background: #fefce8;
  color: #a16207;
  border-color: #fde047;
}

.status-hot {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.status-cold {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #bae6fd !important;
}

.status-no-telegram {
  background: #f5f3ff;
  color: #7e22ce;
  border-color: #c084fc;
}

.status-manual {
  background: #fdf4ff;
  color: #a21caf;
  border-color: #e879f9;
}

.status-error {
  background: #fff1f2;
  color: #be123c;
  border-color: #fda4af;
}

.status-unknown {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

/* Solid Status Indicators for Dropdown Dots */
.status-indicator-new {
  background-color: #64748b !important;
}

.status-indicator-no-reply {
  background-color: #0ea5e9 !important;
}

.status-indicator-sent {
  background-color: #0284c7 !important;
}

.status-indicator-replied {
  background-color: #059669 !important;
}

.status-indicator-warm {
  background-color: #ca8a04 !important;
}

.status-indicator-hot {
  background-color: #dc2626 !important;
}

.status-indicator-cold {
  background-color: #0ea5e9 !important;
}

.status-indicator-no-telegram {
  background-color: #9333ea !important;
}

.status-indicator-manual {
  background-color: #c026d3 !important;
}

.status-indicator-error {
  background-color: #e11d48 !important;
}

.status-indicator-unknown {
  background-color: #6b7280 !important;
}

/* White dot when active for contrast */
.dropdown-item.active .status-indicator-dot {
  background-color: white !important;
}

/* Drop area for contacts */
.drop-area {
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  background-color: #fff;
  transition: 0.2s ease all;
  margin-bottom: 20px;
}

.drop-area.dragover {
  border-color: #007bff;
  background-color: #f0f8ff;
}

/* Muted action buttons */
.btn-muted-blue {
  background-color: #5a7fa2;
  border-color: #5a7fa2;
  color: #fff;
  transition: all 0.2s ease;
}

.btn-muted-blue:hover,
.btn-muted-blue:focus {
  background-color: #4a6a8a;
  border-color: #4a6a8a;
  color: #fff;
}

.btn-muted-green {
  background-color: #7ba087;
  border-color: #7ba087;
  color: #fff;
  transition: all 0.2s ease;
}

.btn-muted-green:hover,
.btn-muted-green:focus {
  background-color: #6a8c75;
  border-color: #6a8c75;
  color: #fff;
}

/* Contacts table — no inner scroll, table flows naturally on the page */
#contacts-view .card.p-0 {
  overflow: visible;
}

#contacts-view .card.p-0>.table-responsive {
  overflow: visible;
}

/* Contacts table header */
#contacts-thead {
  background: linear-gradient(135deg, #1e1e2f 0%, #2d2d44 100%) !important;
  z-index: 2;
}

#contacts-table #contacts-thead tr th {
  color: rgba(255, 255, 255, 0.85) !important;
  background: transparent !important;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 8px;
  text-align: center;
  border: none;
  white-space: nowrap;
  border-bottom: 2px solid #ff4bb2;
}

#contacts-thead tr th:first-child {
  border-radius: 6px 0 0 0;
}

#contacts-thead tr th:last-child {
  border-radius: 0 6px 0 0;
}

/* Checkbox styling */
#contacts-table .form-check-input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Selection bar */
#contacts-selection-bar {
  border: 1px solid #dee2e6;
}

/* Editable fields in contacts table */
#contacts-table .editable-field {
  font-size: 0.8rem;
  padding: 1px 4px;
  border: 1px solid transparent;
  background: transparent;
  max-width: 100%;
}

#contacts-table td {
  padding: 8px 6px !important;
  font-size: 0.8rem;
  text-align: center;
}

#contacts-table .editable-field:hover {
  border-color: #ced4da;
  background: #f8f9fa;
}

#contacts-table .editable-field:focus {
  border-color: #86b7fe;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

#contacts-table select.editable-field {
  min-width: 90px;
}

#contacts-table input.editable-field {
  min-width: 60px;
}


/* Highlighting rows with invalid phone numbers */
.row-invalid-phone {
  background-color: rgba(239, 68, 68, 0.04) !important;
  transition: background-color 0.2s ease;
}

.row-invalid-phone:hover {
  background-color: rgba(239, 68, 68, 0.07) !important;
}

.row-invalid-phone td {
  border-bottom: 1px solid rgba(239, 68, 68, 0.1) !important;
}

.row-invalid-phone .phone-invalid-text {
  color: #ef4444 !important;
  font-weight: 700;
}


/* Delete button */
.delete-contact-btn {
  padding: 2px 6px;
  font-size: 0.85rem;
}

/* =======================
   MODERN MODALS (Premium White)
======================= */
.modern-modal {
  border-radius: 35px !important;
  border: none !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.18) !important;
  overflow: hidden;
}

.modern-modal .modal-header {
  padding: 2rem 2rem 1rem !important;
  border: none !important;
}

.modern-modal .modal-title {
  font-weight: 800;
  color: #1f2937;
  letter-spacing: -0.5px;
}

.modern-modal .modal-body {
  padding: 1rem 2rem 0.5rem !important;
}

.modern-modal .modal-footer {
  padding: 0.5rem 2rem 1.5rem !important;
  border: none !important;
  gap: 12px;
}

.modern-modal-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.modern-modal-icon-box.danger {
  background-color: #fee2e2;
  color: #ef4444;
}

.modern-modal-icon-box.info {
  background-color: #e0f2fe;
  color: #0ea5e9;
}

.modern-modal .btn {
  padding: 10px 24px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.modern-modal .btn-light {
  background-color: #f3f4f6;
  border-color: #f3f4f6;
  color: #4b5563;
}

.modern-modal .btn-light:hover {
  background-color: #e5e7eb;
  transform: translateY(-1px);
}

.modern-modal .btn-primary,
.modern-modal .btn-success,
.modern-modal .btn-danger {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.modern-modal .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

/* Backward compatibility or custom override if needed */
.custom-modal-dark {
  background-color: #1a1a1a;
  color: #ffffff;
  border: 1px solid #333;
}

/* =======================
   DASHBOARD STATS
======================= */
.circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 250px;
}

.circle-bg {
  fill: none;
  stroke: #eee;
  stroke-width: 2.5;
}

.circle {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-out;
}

/* =======================
   CONTACT ACTION BUTTONS
======================= */
.contact-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background-color: #f0f2f5;
  /* Light grey default */
  color: #555;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.contact-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Specific colors per action on hover/active or just static if preferred */

/* History - Blue/Info */
.btn-action-history {
  color: #0dcaf0;
  background-color: #e0f8fc;
}

.btn-action-history:hover {
  background-color: #0dcaf0;
  color: white;
}

.btn-action-history:disabled,
.btn-action-history.disabled {
  background-color: #e9ecef !important;
  color: #adb5bd !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  pointer-events: auto !important;
  /* Allow tooltip to show */
}

/* Delete - Red/Danger */
.btn-action-delete {
  color: #dc3545;
  background-color: #fce8e9;
}

.btn-action-delete:hover {
  background-color: #dc3545;
  color: white;
}

/* Save - Green/Success */
.btn-action-save-new {
  color: #198754;
  background-color: #d1f5e0;
}

.btn-action-save-new:hover {
  background-color: #198754;
  color: white;
}

/* Cancel - Grey */
.btn-action-cancel-new {
  color: #6c757d;
  background-color: #e9ecef;
}

.btn-action-cancel-new:hover {
  background-color: #6c757d;
  color: white;
}

/* Send message button style (не меняет цвета Import/Export) */
#send-btn {
  border-radius: 22px;
}

/* ===========================
   Chat History Modal Styles
   =========================== */
/* Mobile-like modal width */
.modal-mobile-app {
  max-width: 400px;
  margin: 1.75rem auto;
}

.modal-mobile-app .modal-content {
  border-radius: 20px;
  overflow: hidden;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-mobile-app .modal-header {
  background: #008069;
  /* WhatsApp Green header */
  color: white;
  padding: 12px 16px;
}

.modal-mobile-app .modal-header .btn-close {
  filter: invert(1);
  opacity: 0.7;
}

/* =======================
   SUPPORT FAB
======================= */
.support-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.support-fab:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(13, 110, 253, 0.6);
}

.support-fab:active {
  transform: scale(0.95);
}

/* Chat Container adjustment */
.chat-container {
  background-color: #efe7dd;
  background-image: url("https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png");
  background-repeat: repeat;
  padding: 16px 12px;
  height: 60vh;
  /* Relative height for phone feel */
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Chat Footer & Input */
.chat-modal-footer {
  background-color: #f0f2f5;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.chat-input-field {
  border-radius: 24px !important;
  border: 1px solid #ddd !important;
  padding: 10px 16px !important;
  font-size: 0.95rem !important;
  background: white !important;
  box-shadow: none !important;
}

.chat-input-field:focus {
  border-color: #008069 !important;
}

.btn-chat-send {
  border-radius: 50% !important;
  width: 42px !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin-left: 8px !important;
  background-color: #008069 !important;
  border: none !important;
  transition: transform 0.2s;
}

.btn-chat-send:hover {
  background-color: #006a56 !important;
  transform: scale(1.05);
}

.btn-chat-send:active {
  transform: scale(0.95);
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  position: relative;
  margin-bottom: 4px;
}

.chat-message.out {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-message.in {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-date-separator {
  text-align: center;
  margin: 16px 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #54656f;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 12px;
  border-radius: 8px;
  align-self: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-transform: capitalize;
}

/* Fix Bubbles & Tails */
.chat-bubble {
  padding: 6px 10px 4px 10px;
  /* Compact padding */
  border-radius: 7.5px;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
  position: relative;
  font-size: 14px;
  line-height: 19px;
  color: #111;
  word-wrap: break-word;
  max-width: 100%;
}

.chat-message.out .chat-bubble {
  background-color: #dcf8c6;
  border-radius: 7.5px 0 7.5px 7.5px;
  margin-right: 8px;
  /* Space for tail */
}

.chat-message.in .chat-bubble {
  background-color: #ffffff;
  border-radius: 0 7.5px 7.5px 7.5px;
  margin-left: 8px;
  /* Space for tail */
}

/* Improved Tails using clip-path or simpler borders */
/* OUTGOING TAIL (Right) */
.chat-message.out .chat-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 10px 10px;
  /* Triangle pointing top-right */
  border-color: transparent transparent transparent #dcf8c6;
}

/* INCOMING TAIL (Left) */
.chat-message.in .chat-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 10px 10px 0;
  /* Triangle pointing top-left */
  border-color: transparent #ffffff transparent transparent;
}


.chat-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  margin-left: 10px;
  /* space between text and time if wrapping */
  float: right;
  /* allow text to wrap around it like in whatsapp */
  color: rgba(0, 0, 0, 0.45);
  font-size: 11px;
  line-height: 15px;
  white-space: nowrap;
}

.chat-date-separator {
  align-self: center;
  background-color: rgba(225, 245, 254, 0.9);
  border-radius: 7.5px;
  padding: 5px 12px;
  margin: 10px 0;
  font-size: 12.5px;
  color: #555;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* =======================
   TOAST NOTIFICATIONS
======================= */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-notification {
  min-width: 250px;
  max-width: 400px;
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
  pointer-events: auto;
  border-left: 4px solid #ced4da;
  opacity: 0;
}

.toast-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-notification.success {
  border-left-color: #28a745;
}

.toast-notification.error {
  border-left-color: #dc3545;
}

.toast-notification.info {
  border-left-color: #007bff;
}

.toast-content {
  flex-grow: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: #212529;
}

.toast-message {
  font-size: 0.85rem;
  color: #6c757d;
  line-height: 1.4;
}

/* ===== WEB NOTIFICATIONS (Stacked/iOS Style) ===== */
.notification-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
  width: 360px;
}

.notification-container:not(.expanded) {
  height: 100px;
  /* Limit height when collapsed to prevent overlap */
}

.web-notification {
  pointer-events: auto;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 16px;
  margin-bottom: 0;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform-origin: top center;
}

.notification-container:not(.expanded) .web-notification {
  position: absolute;
  top: 0;
  right: 0;
}

.web-notification.show {
  opacity: 1;
}

.notification-controls {
  pointer-events: auto;
  margin-bottom: 0;
  display: flex;
  justify-content: flex-end;
  z-index: 10002;
  position: absolute;
  top: 10px;
  right: 12px;
}

.notification-container.expanded .notification-controls {
  position: relative;
  top: 0;
  right: 0;
  margin-bottom: 8px;
}

.btn-notification-control {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-notification-control:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1f2937;
}

.web-notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  padding-right: 24px;
  /* Space for close button */
}

.web-notification-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1f2937;
}

.web-notification-body {
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.4;
  margin-bottom: 8px;
}

.web-notification-footer {
  display: flex;
  justify-content: flex-end;
}

.web-notification-time {
  font-size: 0.7rem;
  color: #9ca3af;
  font-weight: 500;
}

/* Hide close button in collapsed state to avoid overlap with "More..." button, 
   but SHOW it if there is only one notification (index 0 and no siblings) */
.notification-container:not(.expanded) .web-notification:not(:only-of-type) .web-notification-close {
  display: none;
}

/* Close button for web notifications */
.web-notification-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.25rem;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  z-index: 101;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.web-notification-close:hover {
  color: #4b5563;
  background-color: rgba(0, 0, 0, 0.05);
}

.web-notification:hover {
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

.toast-close {
  background: none;
  border: none;
  color: #adb5bd;
  cursor: pointer;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
  transition: color 0.2s;
}

.toast-close:hover {
  color: #6c757d;
}

.toast-icon {
  font-size: 1.2rem;
  margin-top: 2px;
}

.success .toast-icon {
  color: #28a745;
}

.error .toast-icon {
  color: #dc3545;
}

.info .toast-icon {
  color: #007bff;
}

/* =======================
   INLINE EDITING UI
======================= */
.editable-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
}

.edit-actions {
  position: absolute;
  top: 50%;
  right: -32px;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  background: white;
  padding: 4px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Show buttons when input is focused */
.editable-wrapper:focus-within .edit-actions {
  opacity: 1;
  pointer-events: auto;
  right: -38px;
  /* subtle slide in */
}

.btn-inline-action {
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  font-size: 0.75rem;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-inline-save {
  background: #198754;
  color: white;
}

.btn-inline-save:hover {
  background: #146c43;
  transform: scale(1.1);
}

.btn-inline-cancel {
  background: #6c757d;
  color: white;
}

.btn-inline-cancel:hover {
  background: #5c636a;
  transform: scale(1.1);
}

/* Adjust table cell for overflow if needed, but absolute pos might handle it */
#contacts-table td {
  overflow: visible;
}

/* Modern Action Button */
.btn-modern {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 8px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2), 0 2px 4px -1px rgba(79, 70, 229, 0.1);
  transition: all 0.2s ease;
}

.btn-modern:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3), 0 4px 6px -2px rgba(79, 70, 229, 0.15);
  color: #fff;
}

.btn-modern:active {
  transform: translateY(0);
}

.btn-modern i {
  margin-right: 8px;
}

.sessions-view-wrapper {
  padding-bottom: 80px;
}

/* Inline Edit Utilities */
.cursor-pointer {
  cursor: pointer !important;
}

.btn-quick-edit:hover {
  background: rgba(13, 110, 253, 0.03);
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.02);
}

.btn-inline-avatar-trigger:hover {
  opacity: 0.8;
  filter: brightness(1.1);
}

.session-card.border-primary {
  transition: all 0.3s ease;
  z-index: 10;
}

/* =======================
   TAGS & FILTER CHIPS
   ======================= */
.session-card {
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.session-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1) !important;
}

.session-card .status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 2px 8px;
  font-size: 0.6rem;
  font-weight: 600;
  opacity: 0.9;
  border-radius: 50rem;
  text-transform: uppercase;
}

.session-card .card-body {
  padding-top: 2.5rem !important;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 10px;
  border-radius: 50rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.tag-chip .remove-tag {
  cursor: pointer;
  opacity: 0.6;
  margin-left: 4px;
  transition: opacity 0.2s;
}

.tag-chip .remove-tag:hover {
  opacity: 1;
  color: #dc3545;
}

.filter-chip {
  padding: 6px 16px;
  border-radius: 50rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

.filter-chip.active {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

/* =======================
   TABLE SORTING
======================= */
.sort-header {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  position: relative;
  vertical-align: middle !important;
}

.sort-btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.4);
  /* Muted by default */
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.sort-header:hover .sort-btn-inline {
  color: rgba(255, 255, 255, 0.9);
  transform: scale(1.1);
}

.sort-btn-inline i {
  font-size: 0.7rem;
}

.sort-header.active .sort-btn-inline {
  color: #ff4bb2 !important;
  /* Vibrant pink matching the header border */
  opacity: 1 !important;
}

.sort-header.active .sort-btn-inline i {
  opacity: 1;
}

.sort-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.tags-input-container {
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 12px;
}

/* Reusable remove file button for attachments */
.btn-remove-file {
  color: #adb5bd !important;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1em;
}

.btn-remove-file:hover {
  color: #ef9a9a !important;
  /* Less saturated, duller red */
}