/* Apple iOS Minimalist Design System for Salessage CRM */
:root {
  --ios-bg: #F2F2F7;
  --ios-card: #FFFFFF;
  --ios-sidebar: #FFFFFF;
  --ios-border: #E5E5EA;
  --ios-border-subtle: #F0F0F2;
  --ios-text: #1C1C1E;
  --ios-text-secondary: #8E8E93;
  --ios-text-tertiary: #C7C7CC;
  --ios-blue: #007AFF;
  --ios-blue-light: #EBF5FF;
  --ios-green: #34C759;
  --ios-green-light: #EAF8EE;
  --ios-amber: #FF9500;
  --ios-amber-light: #FFF6E8;
  --ios-red: #FF3B30;
  --ios-red-light: #FEECEB;
  --ios-purple: #5856D6;
  --ios-purple-light: #F0EFFB;
  --ios-radius-lg: 18px;
  --ios-radius-md: 14px;
  --ios-radius-sm: 10px;
  --ios-radius-pill: 9999px;
  --ios-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
  --ios-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
  --ios-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-system);
  background-color: var(--ios-bg);
  color: var(--ios-text);
  line-height: 1.45;
  overflow-x: hidden;
  height: 100vh;
}

/* CRM Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Left Slim Icon Bar (Matches Reference Image) */
.icon-rail {
  width: 68px;
  background: #FFFFFF;
  border-right: 1px solid var(--ios-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  flex-shrink: 0;
  z-index: 20;
  overflow-y: auto;
  scrollbar-width: none;
}

.icon-rail::-webkit-scrollbar {
  display: none;
}

.rail-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #007AFF, #0056B3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.rail-logo:hover {
  transform: scale(1.05);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.rail-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #8E8E93;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.rail-btn:hover {
  background: #F2F2F7;
  color: #1C1C1E;
}

.rail-btn.active {
  background: #EBF5FF;
  color: #007AFF;
}

.rail-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: #007AFF;
  border-radius: 0 4px 4px 0;
}

.rail-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #007AFF;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
  pointer-events: none;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.rail-badge.badge-purple {
  background: #5856D6;
}

.rail-btn.active .rail-badge {
  background: #007AFF;
  color: #FFFFFF;
}

.rail-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
}

/* Secondary Navigation Sidebar (Categories) */
.sub-sidebar {
  width: 220px;
  background: #FFFFFF;
  border-right: 1px solid var(--ios-border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ios-text-secondary);
  margin-bottom: 12px;
  padding-left: 10px;
}

.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #3A3A3C;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.category-item:hover {
  background: #F2F2F7;
  color: #000;
}

.category-item.active {
  background: #EBF5FF;
  color: #007AFF;
  font-weight: 600;
}

.category-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: #E5E5EA;
  color: #636366;
}

.category-item.active .category-badge {
  background: #007AFF;
  color: #FFFFFF;
}

.platform-filter-box {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--ios-border-subtle);
}

.platform-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  color: #3A3A3C;
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.15s;
}

.platform-pill:hover {
  background: #F2F2F7;
}

.platform-pill.active {
  background: #EBF5FF;
  color: #007AFF;
  font-weight: 600;
}

.platform-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-instagram { background: #E1306C; }
.dot-telegram { background: #0088CC; }
.dot-facebook { background: #1877F2; }
.dot-tiktok { background: #000000; }
.dot-youtube { background: #FF0000; }
.dot-direct { background: #34C759; }

/* Main Stage / Content Area */
.main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: #F8F9FB;
}

/* Top App Bar */
.top-bar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--ios-border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 16px;
}

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

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1C1C1E;
}

.leads-count-pill {
  font-size: 13px;
  font-weight: 600;
  color: var(--ios-blue);
  background: var(--ios-blue-light);
  padding: 4px 10px;
  border-radius: 20px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #34C759;
  background: #EAF8EE;
  padding: 4px 10px;
  border-radius: 20px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34C759;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

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

/* Search bar iOS style */
.search-wrapper {
  position: relative;
  width: 240px;
}

.search-input {
  width: 100%;
  background: #F2F2F7;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 12px 8px 34px;
  font-size: 13.5px;
  color: #1C1C1E;
  outline: none;
  transition: all 0.2s ease;
  font-family: var(--font-system);
}

.search-input:focus {
  background: #FFFFFF;
  border-color: #007AFF;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #8E8E93;
  pointer-events: none;
}

/* Target Landing Page Link Pill */
.landing-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F2F2F7;
  border: 1px solid var(--ios-border);
  color: #1C1C1E;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.landing-link-pill:hover {
  background: #E5E5EA;
  border-color: #C7C7CC;
}

.btn-ios {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-system);
  user-select: none;
}

.btn-ios-secondary {
  background: #F2F2F7;
  color: #1C1C1E;
  border: 1px solid var(--ios-border);
}

.btn-ios-secondary:hover {
  background: #E5E5EA;
}

.btn-ios-primary {
  background: #007AFF;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.28);
}

.btn-ios-primary:hover {
  background: #0066D6;
  transform: translateY(-1px);
}

.view-toggle {
  display: flex;
  background: #F2F2F7;
  padding: 3px;
  border-radius: 9px;
  gap: 2px;
}

.view-btn {
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 7px;
  color: #8E8E93;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.view-btn.active {
  background: #FFFFFF;
  color: #1C1C1E;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Secondary Filter Bar */
.filter-bar {
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ios-border-subtle);
  background: #FAFAFC;
  flex-shrink: 0;
}

.quick-filter-chips {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-chip {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  background: #FFFFFF;
  border: 1px solid var(--ios-border);
  color: #48484A;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-chip:hover {
  border-color: #007AFF;
  color: #007AFF;
}

.filter-chip.active {
  background: #1C1C1E;
  color: #FFFFFF;
  border-color: #1C1C1E;
}

/* Board / Kanban View */
.board-container {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 20px 28px;
  display: flex;
  gap: 20px;
}

.board-column {
  flex: 0 0 310px;
  background: #FFFFFF;
  border-radius: var(--ios-radius-lg);
  border: 1px solid var(--ios-border);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  box-shadow: var(--ios-shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.board-column.drag-over {
  border-color: #007AFF;
  background: #F4F9FF;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.25);
}

.column-header {
  padding: 16px 18px 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.column-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-title {
  font-size: 15px;
  font-weight: 700;
  color: #1C1C1E;
}

.column-count {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.badge-new {
  background: #EBF5FF;
  color: #007AFF;
}

.badge-qualified {
  background: #EAF8EE;
  color: #34C759;
}

.badge-pending {
  background: #FFF6E8;
  color: #FF9500;
}

.badge-rejected {
  background: #FEECEB;
  color: #FF3B30;
}

.add-lead-col-btn {
  margin: 0 16px 10px 16px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed #007AFF;
  background: transparent;
  color: #007AFF;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.add-lead-col-btn:hover {
  background: #EBF5FF;
}

.cards-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 4px 14px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Lead Card (Matches Reference Image Layout) */
.lead-card {
  background: #FFFFFF;
  border: 1px solid var(--ios-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  user-select: none;
}

.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ios-shadow-md);
  border-color: #007AFF;
}

.lead-card:active:not(.dragging) {
  transform: scale(0.985);
}

.lead-card.dragging {
  opacity: 0.95;
  border-color: #007AFF;
  box-shadow: 0 14px 30px rgba(0, 122, 255, 0.22), 0 0 0 2px rgba(0, 122, 255, 0.4);
  transform: scale(1.02);
  cursor: grabbing;
  z-index: 100;
}

.lead-card.card-just-moved {
  animation: cardMovedPulse 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardMovedPulse {
  0% {
    transform: scale(0.96) translateY(-4px);
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.4);
  }
  40% {
    transform: scale(1.02) translateY(0);
    border-color: #007AFF;
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.25);
  }
  100% {
    transform: scale(1) translateY(0);
    border-color: var(--ios-border);
    box-shadow: var(--ios-shadow-sm);
  }
}

.lead-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.lead-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.lead-info {
  flex: 1;
  min-width: 0;
}

.lead-name {
  font-size: 14.5px;
  font-weight: 600;
  color: #1C1C1E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #8E8E93;
  margin-top: 1px;
}

.lead-more-btn {
  border: none;
  background: transparent;
  color: #C7C7CC;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s;
}

.lead-more-btn:hover {
  color: #1C1C1E;
  background: #F2F2F7;
}

.lead-details-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ios-border-subtle);
}

.lead-field {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #3A3A3C;
  text-decoration: none;
}

.lead-field:hover {
  color: #007AFF;
}

.lead-field svg {
  color: #8E8E93;
  flex-shrink: 0;
}

.lead-interest-badge {
  font-size: 11px;
  font-weight: 500;
  background: #F2F2F7;
  color: #636366;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Card Action Footer Icons */
.lead-actions-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.action-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--ios-border);
  background: #FFFFFF;
  color: #636366;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.action-icon-btn:hover {
  background: #007AFF;
  border-color: #007AFF;
  color: #FFFFFF;
  transform: scale(1.08);
}

.action-icon-btn.call-btn:hover {
  background: #34C759;
  border-color: #34C759;
}

.action-icon-btn.tg-btn:hover {
  background: #0088CC;
  border-color: #0088CC;
}

.lead-time {
  margin-left: auto;
  font-size: 11px;
  color: #8E8E93;
}

/* Table / List View */
.table-view-container {
  display: none;
  flex: 1;
  overflow: auto;
  padding: 20px 28px;
}

.table-card {
  background: #FFFFFF;
  border: 1px solid var(--ios-border);
  border-radius: var(--ios-radius-lg);
  overflow: hidden;
  box-shadow: var(--ios-shadow-sm);
}

.crm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.crm-table th {
  background: #FAFAFC;
  padding: 14px 18px;
  font-weight: 600;
  color: #636366;
  border-bottom: 1px solid var(--ios-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.crm-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ios-border-subtle);
  color: #1C1C1E;
}

.crm-table tr:hover td {
  background: #F8F9FA;
}

.crm-table tr:last-child td {
  border-bottom: none;
}

/* iOS Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.ios-modal, .modal-card {
  background: #FFFFFF;
  border-radius: 20px;
  width: 90%;
  max-width: 520px;
  box-shadow: var(--ios-shadow-lg);
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .ios-modal,
.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 20px 24px 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ios-border-subtle);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1C1C1E;
}

.modal-close-btn {
  background: #F2F2F7;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #8E8E93;
  transition: all 0.15s;
}

.modal-close-btn:hover {
  background: #E5E5EA;
  color: #1C1C1E;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #3A3A3C;
}

.form-input, .form-select, .form-textarea {
  font-family: var(--font-system);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--ios-border);
  background: #F9F9FB;
  color: #1C1C1E;
  outline: none;
  transition: all 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  background: #FFFFFF;
  border-color: #007AFF;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.modal-footer {
  padding: 16px 24px 20px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--ios-border-subtle);
  background: #FAFAFC;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
}

.ios-toast {
  background: rgba(28, 28, 30, 0.92);
  backdrop-filter: blur(16px);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: var(--ios-shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  pointer-events: auto;
  animation: slideToast 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Target Ad Helper Bar (Top Banner) */
.target-links-bar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--ios-border-subtle);
  padding: 8px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #636366;
  flex-shrink: 0;
}

.target-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: #F2F2F7;
  border-radius: 6px;
  color: #007AFF;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.target-badge-link:hover {
  background: #EBF5FF;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .sub-sidebar {
    display: none;
  }
}

/* iOS Toggle Switch & Settings Modal */
.ios-modal-wide {
  max-width: 660px;
}

.settings-tab-bar {
  display: flex;
  background: #F2F2F7;
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  margin-bottom: 6px;
}

.settings-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #636366;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.settings-tab-btn.active {
  background: #FFFFFF;
  color: #1C1C1E;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.settings-tab-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toggle-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #F8F9FA;
  border-radius: 12px;
  border: 1px solid var(--ios-border-subtle);
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 12px;
}

.toggle-title {
  font-size: 14px;
  font-weight: 600;
  color: #1C1C1E;
}

.toggle-desc {
  font-size: 12px;
  color: #8E8E93;
}

/* iOS Toggle Switch */
.ios-switch, .ios-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  vertical-align: middle;
}

.ios-switch input, .ios-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ios-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #E5E5EA;
  transition: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 34px;
}

.ios-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 50%;
}

.ios-switch input:checked + .ios-slider,
.ios-toggle input:checked + .ios-slider {
  background-color: #34C759;
}

.ios-switch input:checked + .ios-slider:before,
.ios-toggle input:checked + .ios-slider:before {
  transform: translateX(20px);
}

/* Video Tracking & Campaign Links */
.lead-video-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #5856D6;
  background: #F0EFFB;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 4px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-gen-box {
  background: #F8F9FA;
  border: 1px solid var(--ios-border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.copy-link-display {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid var(--ios-border);
  border-radius: 10px;
  padding: 8px 12px;
  gap: 10px;
}

.copy-link-text {
  flex: 1;
  font-family: monospace;
  font-size: 12.5px;
  color: #007AFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}

/* ============================================================
   Dedicated Video & Advertising Links (Campaigns) Section
   ============================================================ */
.campaigns-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #F4F5F8;
  gap: 22px;
  padding: 24px 28px;
}

.campaigns-col-left {
  width: 390px;
  min-width: 330px;
  max-width: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.cmp-creator-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cmp-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cmp-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cmp-submit-btn {
  width: 100%;
  justify-content: center;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 700;
  background: #007AFF;
  border-radius: 11px;
  margin-top: 2px;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.22);
}

.cmp-submit-btn:hover {
  background: #0069D9;
  transform: translateY(-1px);
}

/* Quick Platform Presets inside Creator Card */
.cmp-quick-section {
  border-top: 1px solid var(--ios-border-subtle);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cmp-quick-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #8E8E93;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cmp-quick-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmp-quick-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #F8F9FA;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 11px;
  font-family: var(--font-system);
  font-size: 13px;
  font-weight: 600;
  color: #1C1C1E;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.cmp-quick-chip:hover {
  background: #FFFFFF;
  border-color: #007AFF;
  color: #007AFF;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.1);
  transform: translateX(2px);
}

.cmp-chip-copy {
  font-size: 11.5px;
  font-weight: 600;
  color: #8E8E93;
  background: #FFFFFF;
  border: 1px solid var(--ios-border);
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.cmp-quick-chip:hover .cmp-chip-copy {
  background: #EBF5FF;
  border-color: #007AFF;
  color: #007AFF;
}

/* Right Column: List & Filter Toolbar */
.campaigns-col-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cmp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ios-border-subtle);
  flex-wrap: wrap;
}

.cmp-search-wrap {
  position: relative;
  flex: 1;
  min-width: 190px;
}

.cmp-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8E8E93;
}

.cmp-search-input {
  width: 100%;
  font-family: var(--font-system);
  font-size: 13px;
  padding: 8px 14px 8px 34px;
  background: #F2F2F7;
  border: 1px solid transparent;
  border-radius: 9px;
  outline: none;
  transition: all 0.15s ease;
}

.cmp-search-input:focus {
  background: #FFFFFF;
  border-color: #007AFF;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.cmp-filter-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #F2F2F7;
  padding: 3px;
  border-radius: 9px;
}

.campaign-filter-pill {
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: 7px;
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 600;
  color: #636366;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.campaign-filter-pill:hover {
  color: #1C1C1E;
}

.campaign-filter-pill.active {
  background: #FFFFFF;
  color: #007AFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.campaigns-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 0 6px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Sleek Campaign Item Card */
.campaign-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: #FFFFFF;
  border: 1px solid var(--ios-border);
  border-radius: 13px;
  gap: 14px;
  transition: all 0.18s ease;
}

.campaign-card-item:hover {
  border-color: #007AFF;
  box-shadow: 0 3px 12px rgba(0, 122, 255, 0.08);
  transform: translateY(-1px);
}

.cmp-item-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmp-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cmp-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #1C1C1E;
}

.cmp-item-badge {
  font-size: 11px;
  font-weight: 600;
  color: #5856D6;
  background: #F0EFFF;
  padding: 2px 7px;
  border-radius: 6px;
}

.cmp-item-url-hint {
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #8E8E93;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmp-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.campaign-leads-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.campaign-leads-pill.zero-leads {
  color: #8E8E93;
  background: #F2F2F7;
}

.campaign-leads-pill.has-leads {
  color: #34C759;
  background: #EAF8EE;
  box-shadow: 0 0 0 1px rgba(52, 199, 89, 0.2);
}

.cmp-copy-btn {
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
}

.cmp-icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F2F2F7;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 8px;
  color: #3A3A3C;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.cmp-icon-btn:hover {
  background: #E5E5EA;
  color: #007AFF;
}

.cmp-icon-btn.delete-icon {
  color: #8E8E93;
}

.cmp-icon-btn.delete-icon:hover {
  background: #FFECEB;
  color: #FF3B30;
  border-color: #FFB3AE;
}

.cmp-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

@media (max-width: 1100px) {
  .campaigns-workspace {
    flex-direction: column;
    overflow-y: auto;
    padding: 16px;
  }

  .campaigns-col-left {
    width: 100%;
    max-width: none;
  }

  .campaigns-col-right {
    min-height: 500px;
  }
}

/* ============================================================
   Target & Reklama Hub - Segmented Switcher
   ============================================================ */
.target-segmented-control {
  display: flex;
  background: #EBECEF;
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.target-segment-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #636366;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: var(--font-system);
  white-space: nowrap;
}

.target-segment-btn:hover {
  color: #1C1C1E;
}

.target-segment-btn.active {
  background: #FFFFFF;
  color: #007AFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.target-segment-btn.active svg {
  stroke: #007AFF;
}

.target-tab-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ============================================================
   Target & Reklama Hub - Categories Workspace
   ============================================================ */
.target-categories-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #F4F5F8;
  padding: 24px 32px;
}

.target-categories-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.target-categories-header-note {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid var(--ios-border-subtle);
  padding: 18px 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.target-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.target-category-card {
  background: #FFFFFF;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.target-category-card:hover:not(.coming-soon-card) {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  border-color: #007AFF;
}

.target-category-card.coming-soon-card {
  background: #FAFAFC;
  opacity: 0.82;
  cursor: default;
}

.target-cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.target-cat-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.cat-icon-purple {
  background: linear-gradient(135deg, #5856D6, #007AFF);
}

.cat-icon-blue {
  background: linear-gradient(135deg, #007AFF, #00C7BE);
}

.cat-icon-orange {
  background: linear-gradient(135deg, #FF9500, #FF2D55);
}

.cat-icon-green {
  background: linear-gradient(135deg, #34C759, #30B0C7);
}

.cat-icon-pink {
  background: linear-gradient(135deg, #AF52DE, #FF2D55);
}

.cat-icon-cyan {
  background: linear-gradient(135deg, #00C7BE, #007AFF);
}

.cat-icon-gold {
  background: linear-gradient(135deg, #FF9500, #FFCC00);
}

.cat-icon-indigo {
  background: linear-gradient(135deg, #5856D6, #3634A3);
}

.cat-icon-red {
  background: linear-gradient(135deg, #FF3B30, #FF2D55);
}

.target-cat-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #5856D6;
  background: #F0EFFF;
  padding: 4px 10px;
  border-radius: 8px;
}

.target-cat-badge.badge-blue {
  color: #007AFF;
  background: #EBF5FF;
}

.target-cat-badge.badge-orange {
  color: #FF9500;
  background: #FFF5E8;
}

.target-cat-badge.badge-green {
  color: #34C759;
  background: #EAF8EE;
}

.target-cat-badge.badge-purple {
  color: #AF52DE;
  background: #F9EFFF;
}

.target-cat-badge.badge-gray {
  color: #8E8E93;
  background: #F2F2F7;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.target-cat-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.target-cat-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #1C1C1E;
  margin: 0;
  line-height: 1.3;
}

.target-cat-desc {
  font-size: 13px;
  color: #636366;
  line-height: 1.5;
  margin: 0;
}

.target-cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.target-cat-tag {
  font-size: 11.5px;
  font-weight: 500;
  color: #636366;
  background: #F2F2F7;
  padding: 3px 8px;
  border-radius: 6px;
}

.target-cat-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid #F2F2F7;
  padding-top: 12px;
  margin-top: 4px;
}

.target-cat-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #007AFF;
  transition: transform 0.15s ease;
}

.target-category-card:hover:not(.coming-soon-card) .target-cat-enter-btn {
  transform: translateX(3px);
}

/* Dedicated Registration Page Settings Section */
.crm-view-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.settings-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #F4F5F8;
  position: relative;
}

.settings-editor-scroll {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 24px 32px 60px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.settings-editor-inner {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ios-settings-card {
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid var(--ios-border-subtle);
  padding: 22px 26px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
}

.ios-settings-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.ios-settings-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #F2F2F7;
  padding-bottom: 12px;
  margin-bottom: 2px;
}

.ios-settings-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #1C1C1E;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ios-settings-card-desc {
  font-size: 12px;
  color: #8E8E93;
}

/* Dedicated Live iPhone Studio Pane */
.settings-preview-pane {
  width: 430px;
  background: #F8F9FC;
  border-left: 1px solid var(--ios-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.02);
}

.preview-pane-header {
  padding: 14px 22px;
  border-bottom: 1px solid var(--ios-border);
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  flex-shrink: 0;
}

.preview-reload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #F2F2F7;
  border: 1px solid var(--ios-border);
  border-radius: 9px;
  color: #1C1C1E;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: var(--font-system);
  user-select: none;
}

.preview-reload-btn:hover {
  background: #EBF5FF;
  color: #007AFF;
  border-color: #B9DAFF;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 122, 255, 0.15);
}

.preview-reload-btn:active {
  transform: scale(0.96);
}

.preview-reload-btn svg {
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.preview-reload-btn:hover svg {
  transform: rotate(180deg);
}

.iphone-frame-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px 24px 20px;
  overflow: hidden;
}

.iphone-device {
  width: 316px;
  height: 630px;
  max-height: calc(100vh - 130px);
  background: #1C1C1E;
  border-radius: 46px;
  padding: 10px;
  box-shadow: 0 22px 60px -10px rgba(0, 0, 0, 0.25), 0 0 0 2px #E5E5EA, 0 0 0 6px #F2F2F7;
  position: relative;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.iphone-device:hover {
  box-shadow: 0 26px 70px -8px rgba(0, 0, 0, 0.28), 0 0 0 2px #D1D1D6, 0 0 0 6px #E5E5EA;
}

.iphone-notch {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 20px;
  background: #000000;
  border-radius: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.iphone-speaker {
  width: 32px;
  height: 3px;
  background: #2C2C2E;
  border-radius: 2px;
}

.iphone-camera {
  width: 6px;
  height: 6px;
  background: #1C1C1E;
  border: 1.5px solid #2C2C2E;
  border-radius: 50%;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  border-radius: 37px;
  border: none;
  background: #FFFFFF;
  overflow: hidden;
  display: block;
}

/* Sidebar Section Navigation Header */
.sidebar-section-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ios-border-subtle);
}

.sidebar-nav-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: #3A3A3C;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.sidebar-nav-tab:hover {
  background: #F2F2F7;
  color: #000000;
}

.sidebar-nav-tab.active {
  background: #EBF5FF;
  color: #007AFF;
}

.sidebar-nav-tab.active svg {
  stroke: #007AFF;
}

/* ============================================================
   Lead Details Modal Enhancements (Apple / iOS Style)
   ============================================================ */
.ios-modal.ios-modal-details {
  max-width: 580px;
  width: 92%;
}

.lead-hero-card {
  background: linear-gradient(135deg, #F8F9FD, #EEF2F9);
  border: 1px solid var(--ios-border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lead-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lead-hero-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007AFF, #5856D6);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
  flex-shrink: 0;
}

.lead-hero-info {
  flex: 1;
  min-width: 0;
}

.lead-hero-name {
  font-size: 18px;
  font-weight: 700;
  color: #1C1C1E;
  margin-bottom: 5px;
  letter-spacing: -0.3px;
}

.lead-hero-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-hero-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 12px;
}

.hero-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-system);
}

.hero-action-call {
  background: #007AFF;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}
.hero-action-call:hover {
  background: #0062CC;
  color: #FFFFFF;
}

.hero-action-tg {
  background: #0088CC;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.25);
}
.hero-action-tg:hover {
  background: #0077B5;
  color: #FFFFFF;
}
.hero-action-tg.disabled {
  background: #E5E5EA;
  color: #8E8E93;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.hero-action-copy {
  background: #FFFFFF;
  color: #1C1C1E;
  border: 1px solid var(--ios-border);
}
.hero-action-copy:hover {
  background: #F2F2F7;
}

/* Metadata Grid */
.lead-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.meta-grid-item {
  background: #F9F9FB;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-grid-label {
  font-size: 11px;
  font-weight: 600;
  color: #8E8E93;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-grid-val {
  font-size: 13px;
  font-weight: 600;
  color: #1C1C1E;
  word-break: break-word;
}

/* Stage Switcher Pills */
.lead-stage-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #F2F2F7;
  padding: 4px;
  border-radius: 12px;
}

.stage-pill-btn {
  border: none;
  background: transparent;
  padding: 9px 6px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: #636366;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
  font-family: var(--font-system);
}

.stage-pill-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.6);
  color: #1C1C1E;
}

.stage-pill-btn.active {
  background: #FFFFFF;
  color: #007AFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.stage-pill-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.dot-new { background: #007AFF; }
.dot-qualified { background: #34C759; }
.dot-pending { background: #FF9500; }
.dot-rejected { background: #FF3B30; }

/* Accordion for editing fields */
.lead-edit-accordion {
  border: 1px solid var(--ios-border-subtle);
  border-radius: 12px;
  background: #FAFAFC;
  overflow: hidden;
  margin-top: 2px;
}

.lead-accordion-summary {
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #007AFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none;
}
.lead-accordion-summary::-webkit-details-marker {
  display: none;
}
.lead-accordion-summary svg {
  transition: transform 0.2s ease;
}
.lead-edit-accordion[open] .lead-accordion-summary svg {
  transform: rotate(180deg);
}

.lead-accordion-content {
  padding: 12px 14px 16px 14px;
  border-top: 1px solid var(--ios-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FFFFFF;
}

/* ============================================================
   Registration Page Builder
   ============================================================ */
.gf-header-card {
  position: relative;
  overflow: hidden;
  border-top: 5px solid #007AFF;
}

.gf-header-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EBF5FF;
  color: #007AFF;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  width: fit-content;
}

/* Modern Segmented Tab Switcher (Apple iOS Style) */
.gf-tab-bar {
  display: flex;
  background: rgba(118, 118, 128, 0.12);
  padding: 3px;
  border-radius: 11px;
  gap: 3px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.gf-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #636366;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
  font-family: var(--font-system);
}

.gf-tab-btn:hover {
  color: #1C1C1E;
}

.gf-tab-btn.active {
  background: #FFFFFF;
  color: #007AFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.08);
}

.gf-tab-btn svg {
  color: currentColor;
  flex-shrink: 0;
}

.gf-tab-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: #F2F2F7;
  color: #8E8E93;
  font-weight: 700;
  transition: all 0.2s ease;
}

.gf-tab-btn.active .gf-tab-badge {
  background: #EBF5FF;
  color: #007AFF;
}

.gf-tab-section {
  animation: gfFadeIn 0.2s ease;
}

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

/* ============================================================
   Account & System Settings Modal
   ============================================================ */
.account-modal-box {
  max-width: 620px;
  width: 94%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.account-modal-box .modal-body {
  overflow-y: auto;
  flex: 1;
}

.acc-tab-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: gfFadeIn 0.2s ease;
}

/* Profile summary card */
.acc-profile-card {
  background: #F8F9FA;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.acc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007AFF, #5856D6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 122, 255, 0.25);
  letter-spacing: 0.5px;
}

.acc-online-badge {
  background: #E8F8EE;
  color: #34C759;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
}

/* Notification sound highlight card */
.acc-sound-card {
  background: #FFFBF2;
  border: 1.5px solid rgba(255, 149, 0, 0.35);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Toggle row (label on the left, switch on the right) */
.acc-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
}

.acc-toggle-row + .acc-toggle-row {
  border-top: 1px solid var(--ios-border-subtle);
}

.acc-toggle-label {
  font-size: 13.5px;
  color: #1C1C1E;
  font-weight: 500;
  line-height: 1.35;
}

.acc-toggle-hint {
  font-size: 11.5px;
  color: #8E8E93;
  font-weight: 400;
  margin-top: 2px;
}

.acc-inline-select {
  width: 150px;
  flex-shrink: 0;
  padding: 7px 10px;
  font-size: 13px;
}

/* Data management action buttons */
.acc-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.acc-action-btn {
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 11px;
  width: 100%;
}

.acc-action-btn svg {
  flex-shrink: 0;
}

/* System information grid */
.acc-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  background: #F8F9FA;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
}

.acc-info-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #8E8E93;
}

.acc-info-item b {
  font-size: 12.5px;
  color: #1C1C1E;
  font-weight: 600;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .acc-action-grid,
  .acc-info-grid {
    grid-template-columns: 1fr;
  }
}

/* Questions Builder Container */
.gf-builder-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Sleek, Compact Question Card */
.gf-question-card {
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid var(--ios-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: all 0.18s ease;
  border-left: 4px solid #D1D5DB;
}

.gf-question-card:hover,
.gf-question-card:focus-within {
  border-color: #C7C7CC;
  border-left-color: #007AFF;
  box-shadow: 0 3px 12px rgba(0, 122, 255, 0.09);
}

.gf-question-card.system-card {
  border-left-color: #34C759;
}

.gf-card-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gf-question-number {
  font-size: 13px;
  font-weight: 700;
  color: #8E8E93;
  width: 22px;
  flex-shrink: 0;
  text-align: center;
}

.gf-question-title-wrap {
  flex: 1;
  min-width: 0;
}

.gf-question-title-input {
  width: 100%;
  font-family: var(--font-system);
  font-size: 14.5px;
  font-weight: 600;
  color: #1C1C1E;
  padding: 9px 12px;
  background: #F8F9FA;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 9px;
  outline: none;
  transition: all 0.15s ease;
}

.gf-question-title-input:focus {
  background: #FFFFFF;
  border-color: #007AFF;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.gf-type-select-wrap {
  width: 190px;
  flex-shrink: 0;
}

.gf-type-select {
  width: 100%;
  font-family: var(--font-system);
  font-size: 13px;
  font-weight: 600;
  color: #3A3A3C;
  padding: 9px 10px;
  background: #F2F2F7;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 9px;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gf-type-select:hover {
  background: #E5E5EA;
}

.gf-type-select:focus {
  background: #FFFFFF;
  border-color: #007AFF;
}

/* Card Body */
.gf-card-body {
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Minimal Single-line Stub for text/phone/textarea */
.gf-clean-field-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #F8F9FA;
  border-bottom: 1.5px dotted #C7C7CC;
  border-radius: 6px 6px 0 0;
  width: fit-content;
  min-width: 180px;
  user-select: none;
}

.gf-preview-text {
  font-size: 12.5px;
  color: #8E8E93;
  font-style: italic;
}

.gf-options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gf-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gf-option-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #C7C7CC;
  flex-shrink: 0;
}

.gf-option-input {
  flex: 1;
  font-family: var(--font-system);
  font-size: 13px;
  padding: 7px 10px;
  background: #FFFFFF;
  border: 1px solid var(--ios-border);
  border-radius: 8px;
  outline: none;
  transition: all 0.15s ease;
}

.gf-option-input:focus {
  border-color: #007AFF;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.12);
}

.gf-option-delete-btn {
  background: transparent;
  border: none;
  color: #8E8E93;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.15s ease;
}

.gf-option-delete-btn:hover {
  background: #FFECEB;
  color: #FF3B30;
}

.gf-add-option-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #007AFF;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 6px;
  width: fit-content;
  transition: all 0.15s ease;
}

.gf-add-option-btn:hover {
  background: #EBF5FF;
}

/* Card Footer */
.gf-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #F2F2F7;
  padding-top: 10px;
  margin-top: 2px;
}

.gf-footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gf-card-action-btn {
  background: #F2F2F7;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #636366;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gf-card-action-btn:hover:not(:disabled) {
  background: #E5E5EA;
  color: #1C1C1E;
}

.gf-card-action-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.gf-footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gf-footer-divider {
  width: 1px;
  height: 16px;
  background: #E5E5EA;
}

.gf-required-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #3A3A3C;
  user-select: none;
}

.gf-delete-btn {
  background: transparent;
  border: none;
  color: #8E8E93;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gf-delete-btn:hover {
  background: #FFECEB;
  color: #FF3B30;
}

/* Clean Add Question Button */
.gf-add-question-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  background: #FFFFFF;
  border: 1.5px dashed #007AFF;
  border-radius: 12px;
  color: #007AFF;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.gf-add-question-bar:hover {
  background: #F0F7FF;
  border-style: solid;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 122, 255, 0.14);
}

.gf-answer-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: #F8F9FA;
  border-radius: 8px;
  border: 1px solid var(--ios-border-subtle);
}

.gf-answer-q {
  font-size: 11px;
  font-weight: 600;
  color: #8E8E93;
  text-transform: uppercase;
}

.gf-answer-v {
  font-size: 13.5px;
  font-weight: 600;
  color: #1C1C1E;
}

/* ============================================================
   Campaign Video URL & Video Player Modal Enhancements
   ============================================================ */
.cmp-video-url-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cmp-fetch-btn {
  white-space: nowrap;
  padding: 0 14px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #007AFF;
  background: #F0F7FF;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cmp-fetch-btn:hover {
  background: #007AFF;
  color: #FFFFFF;
}

.cmp-video-preview-box {
  margin-top: 10px;
  padding: 10px 12px;
  background: #F8F9FC;
  border: 1px solid rgba(0, 122, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.2s ease;
}

.cmp-video-thumb-preview {
  width: 58px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  background: #E5E5EA;
  flex-shrink: 0;
}

.cmp-video-preview-info {
  flex: 1;
  min-width: 0;
}

.cmp-video-preview-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #1C1C1E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.cmp-video-preview-sub {
  font-size: 11px;
  color: #8E8E93;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cmp-has-video-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: rgba(255, 59, 48, 0.08);
  color: #FF3B30;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.cmp-original-video-link-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 11.5px;
}

.cmp-orig-label {
  color: #8E8E93;
  font-weight: 500;
}

.cmp-orig-link {
  color: #007AFF;
  text-decoration: none;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmp-orig-link:hover {
  text-decoration: underline;
}

.cmp-watch-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255, 59, 48, 0.08);
  color: #FF3B30;
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cmp-watch-video-btn:hover {
  background: #FF3B30;
  color: #FFFFFF;
}

.cmp-attach-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  background: #F2F2F7;
  color: #5856D6;
  border: 1px solid rgba(88, 86, 214, 0.2);
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cmp-attach-video-btn:hover {
  background: #5856D6;
  color: #FFFFFF;
}

.video-modal-player-area {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal-player-area iframe,
.video-modal-player-area video {
  width: 100%;
  height: 100%;
  border: none;
}

.video-modal-info-box {
  padding: 10px 14px;
  background: #F2F2F7;
  border-radius: 10px;
}

.video-modal-url-text {
  font-size: 12.5px;
  font-family: monospace;
  color: #1C1C1E;
  word-break: break-all;
}

/* ==========================================================================
   PART 1: FOLLOW-UP TASKS & REMINDERS (ESLATMALAR & QAYTA QO'NG'IROQLAR)
   ========================================================================== */

/* Bell button on Top Bar */
.btn-reminders-bell {
  position: relative;
}

.reminders-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #FF3B30;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 10px;
  min-width: 17px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(255, 59, 48, 0.4);
  animation: badgePulse 2s infinite ease-in-out;
}

@keyframes badgePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* Kanban & Table Lead Follow-up Pill */
.lead-followup-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 5px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
}

.lead-followup-pill svg {
  flex-shrink: 0;
}

.lead-followup-pill.followup-overdue {
  background: rgba(255, 59, 48, 0.12);
  color: #FF3B30;
  border: 1px solid rgba(255, 59, 48, 0.25);
  animation: overduePulse 1.8s infinite;
}

@keyframes overduePulse {
  0% { opacity: 1; }
  50% { opacity: 0.75; }
  100% { opacity: 1; }
}

.lead-followup-pill.followup-today {
  background: rgba(255, 149, 0, 0.12);
  color: #D97706;
  border: 1px solid rgba(255, 149, 0, 0.28);
}

.lead-followup-pill.followup-upcoming {
  background: rgba(0, 122, 255, 0.08);
  color: #007AFF;
  border: 1px solid rgba(0, 122, 255, 0.2);
}

/* Follow-up card inside detailsModal */
.lead-followup-card {
  background: #F8F9FE;
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: 12px;
  padding: 13px 15px;
  margin-top: 4px;
}

.followup-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.followup-header-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 149, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.followup-quick-presets {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.quick-preset-label {
  font-size: 11px;
  color: #8E8E93;
  font-weight: 600;
  margin-right: 2px;
}

.preset-chip {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1C1C1E;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover {
  background: #007AFF;
  color: #FFFFFF;
  border-color: #007AFF;
}

.active-reminder-banner {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.banner-overdue {
  border-left: 4px solid #FF3B30;
  background: #FFF9F9;
}

.banner-today {
  border-left: 4px solid #FF9500;
  background: #FFFAF0;
}

.banner-upcoming {
  border-left: 4px solid #007AFF;
  background: #F6FAFF;
}

/* Slide-Over Reminders Drawer */
.reminders-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.reminders-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.reminders-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 92vw;
  background: #FFFFFF;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.reminders-drawer.active {
  transform: translateX(0);
}

.reminders-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ios-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.reminders-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 149, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.reminders-drawer-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1C1C1E;
}

.reminders-drawer-sub {
  margin: 2px 0 0 0;
  font-size: 11.5px;
  color: #8E8E93;
}

.reminders-pill-counter {
  background: #FF9500;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
}

.reminders-tabs-bar {
  padding: 10px 16px;
  background: #F4F5F8;
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--ios-border-subtle);
}

.reminders-tab-btn {
  flex: 1;
  padding: 6px 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #8E8E93;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.reminders-tab-btn.active {
  background: #FFFFFF;
  color: #1C1C1E;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.rem-tab-count {
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
}

.rem-tab-overdue {
  background: rgba(255, 59, 48, 0.15);
  color: #FF3B30;
}

.reminders-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Single Reminder Card in Drawer */
.reminder-card-item {
  background: #FFFFFF;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
}

.reminder-card-item:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.reminder-card-item.is-overdue {
  border-left: 4px solid #FF3B30;
}

.reminder-card-item.is-today {
  border-left: 4px solid #FF9500;
}

.reminder-card-item.is-upcoming {
  border-left: 4px solid #007AFF;
}

.reminder-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.reminder-item-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #1C1C1E;
  cursor: pointer;
}

.reminder-item-name:hover {
  color: #007AFF;
}

.reminder-time-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.reminder-time-tag.time-overdue {
  background: rgba(255, 59, 48, 0.12);
  color: #FF3B30;
}

.reminder-time-tag.time-today {
  background: rgba(255, 149, 0, 0.12);
  color: #D97706;
}

.reminder-time-tag.time-upcoming {
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
}

.reminder-item-note {
  font-size: 12.5px;
  color: #3C3C43;
  line-height: 1.4;
  background: #F8F9FA;
  padding: 7px 10px;
  border-radius: 7px;
}

.reminder-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  gap: 8px;
}

.reminder-action-call {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #34C759;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  transition: opacity 0.2s;
}

.reminder-action-call:hover {
  opacity: 0.9;
}

.reminder-action-complete {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F2F2F7;
  color: #1C1C1E;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.reminder-action-complete:hover {
  background: #E5E5EA;
  color: #34C759;
}

.reminder-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #8E8E93;
}

/* ==========================================================================
   PART 2: REKLAMA TAHLILI & DASHBOARD (ANALYTICS & ADS METRICS)
   ========================================================================== */

.analytics-workspace-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.analytics-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Time range segmented switch */
.time-range-segmented {
  display: inline-flex;
  background: #E5E5EA;
  border-radius: 9px;
  padding: 2px;
}

.time-range-btn {
  border: none;
  background: transparent;
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: #8E8E93;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.time-range-btn.active {
  background: #FFFFFF;
  color: #1C1C1E;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Row 1: KPI Cards Grid */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.analytics-kpi-card {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid var(--ios-border-subtle);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.analytics-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

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

.kpi-title {
  font-size: 11px;
  font-weight: 700;
  color: #8E8E93;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.kpi-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-blue {
  background: rgba(0, 122, 255, 0.12);
}

.kpi-icon-green {
  background: rgba(52, 199, 89, 0.12);
}

.kpi-icon-amber {
  background: rgba(255, 149, 0, 0.12);
}

.kpi-icon-purple {
  background: rgba(175, 82, 222, 0.12);
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.kpi-main-num {
  font-size: 26px;
  font-weight: 800;
  color: #1C1C1E;
  letter-spacing: -0.5px;
}

.kpi-growth-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.kpi-tag-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.chip-green {
  background: rgba(52, 199, 89, 0.14);
  color: #34C759;
}

.chip-amber {
  background: rgba(255, 149, 0, 0.14);
  color: #FF9500;
}

.kpi-subtext {
  font-size: 12px;
  color: #8E8E93;
  line-height: 1.35;
}

/* Row 2: Dynamic Charts Grid */
.analytics-charts-grid {
  display: grid;
  grid-template-columns: 1.6fr 1.1fr;
  gap: 14px;
}

.analytics-chart-card {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 20px 22px;
  border: 1px solid var(--ios-border-subtle);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.chart-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1C1C1E;
  margin: 0;
}

.chart-card-sub {
  font-size: 12px;
  color: #8E8E93;
  margin: 2px 0 0 0;
}

.chart-legend-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1C1C1E;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chart-svg-wrapper {
  width: 100%;
  height: 250px;
  position: relative;
}

/* Interactive hover tooltip on chart */
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: #1C1C1E;
  color: #FFFFFF;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -120%);
  white-space: nowrap;
  z-index: 10;
  display: none;
}

/* Platform Donut Layout */
.platform-donut-layout {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 250px;
}

.donut-svg-wrap {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center-info {
  position: absolute;
  text-align: center;
  pointer-events: none;
}

.donut-center-number {
  font-size: 24px;
  font-weight: 800;
  color: #1C1C1E;
  line-height: 1;
}

.donut-center-label {
  font-size: 11px;
  color: #8E8E93;
  margin-top: 2px;
}

.donut-legend-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.donut-legend-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.d-leg-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.d-leg-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1C1C1E;
}

.d-leg-val {
  font-weight: 700;
  color: #8E8E93;
}

.d-leg-bar-bg {
  width: 100%;
  height: 6px;
  background: #F2F2F7;
  border-radius: 3px;
  overflow: hidden;
}

.d-leg-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* Row 3: Bottom Grid (Funnel + Creatives Table) */
.analytics-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 14px;
}

.analytics-funnel-card,
.analytics-creatives-card {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 20px 22px;
  border: 1px solid var(--ios-border-subtle);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
}

.funnel-stages-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.funnel-stage-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.funnel-stage-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #1C1C1E;
}

.funnel-stage-bar-outer {
  width: 100%;
  height: 28px;
  background: #F4F5F8;
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.funnel-stage-bar-inner {
  height: 100%;
  border-radius: 7px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.funnel-stage-desc {
  font-size: 11.5px;
  color: #8E8E93;
}

/* Creatives Table */
.creatives-table-wrap {
  overflow-x: auto;
}

.analytics-table th {
  font-size: 11.5px;
  font-weight: 700;
  color: #8E8E93;
  text-transform: uppercase;
  padding: 10px 12px;
}

.analytics-table td {
  padding: 12px;
  font-size: 13px;
  vertical-align: middle;
}

.creative-name-cell {
  font-weight: 600;
  color: #1C1C1E;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1100px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .analytics-charts-grid,
  .analytics-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   USERS MANAGEMENT VIEW & PERMISSIONS SYSTEM
   ============================================================================= */
.users-page-header {
  padding: 24px 32px 18px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--ios-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 16px;
}

.users-page-title {
  font-size: 20px;
  font-weight: 700;
  color: #1C1C1E;
  margin: 0;
  letter-spacing: -0.3px;
}

.users-page-sub {
  font-size: 12.5px;
  color: #8E8E93;
  margin-top: 3px;
}

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

.users-search-wrap {
  position: relative;
  width: 300px;
  max-width: 100%;
}

.users-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8E8E93;
  pointer-events: none;
}

.users-search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: #FFFFFF;
  border: 1px solid var(--ios-border);
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  color: #1C1C1E;
  outline: none;
  transition: all 0.15s ease;
}

.users-search-input:focus {
  border-color: #007AFF;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.users-role-tabs {
  display: inline-flex;
  background: #E5E5EA;
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.users-role-tab {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #636366;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.users-role-tab:hover {
  color: #1C1C1E;
}

.users-role-tab.active {
  background: #FFFFFF;
  color: #1C1C1E;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.users-list-wrap {
  flex: 1;
  padding: 0 32px 32px;
  overflow-y: auto;
}

.users-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.user-card-item {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid var(--ios-border-subtle);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.user-card-item:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.user-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.user-card-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.user-card-info h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #1C1C1E;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-card-info .user-uname {
  font-size: 12px;
  color: #8E8E93;
  margin-top: 1px;
}

.user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Distinct role styles */
.badge-role-superadmin {
  background: rgba(255, 149, 0, 0.12);
  color: #D97706;
}
.badge-role-owner {
  background: rgba(175, 82, 222, 0.12);
  color: #8936B2;
}
.badge-role-rob {
  background: rgba(0, 122, 255, 0.12);
  color: #0066D6;
}
.badge-role-targetolog {
  background: rgba(52, 199, 89, 0.12);
  color: #248A3D;
}
.badge-role-manager {
  background: rgba(90, 200, 250, 0.15);
  color: #007799;
}

.user-status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
}

.user-status-active {
  background: #E8F8EE;
  color: #34C759;
}

.user-status-inactive {
  background: #F2F2F7;
  color: #8E8E93;
}

.user-status-blocked {
  background: #FEECEB;
  color: #FF3B30;
}

.user-card-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: #636366;
  padding: 10px 12px;
  background: #F8F9FB;
  border-radius: 10px;
}

.user-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-meta-row svg {
  color: #8E8E93;
  flex-shrink: 0;
}

.user-permissions-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.perm-pill {
  font-size: 10.5px;
  padding: 2px 7px;
  background: #F2F2F7;
  color: #3C3C43;
  border-radius: 5px;
  font-weight: 500;
}

.perm-pill.has-perm {
  background: #E5F1FF;
  color: #007AFF;
  font-weight: 600;
}

.user-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #F2F2F7;
}

.users-empty,
.users-loading {
  text-align: center;
  padding: 60px 20px;
  color: #8E8E93;
  font-size: 14px;
}

/* Permissions Checkbox / Toggle list */
.perm-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #F8F9FB;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.perm-check-item:hover {
  background: #F2F4F8;
}

.perm-check-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.perm-check-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1C1C1E;
}

.perm-check-desc {
  font-size: 11.5px;
  color: #8E8E93;
}

/* Top bar user indicator badge */
.topbar-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #F2F2F7;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #1C1C1E;
}

.rail-btn-logout:hover {
  background: rgba(255, 59, 48, 0.12) !important;
  color: #FF3B30 !important;
}

.rail-btn.active {
  background: rgba(0, 122, 255, 0.15);
  color: #007AFF;
}

/* =============================================================================
   META (FACEBOOK & INSTAGRAM) LEAD ADS INTEGRATION (AMOCRM-STYLE)
   ============================================================================= */
.meta-ads-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #F4F5F8;
  position: relative;
}

.meta-ads-scroll {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 24px 32px 60px 32px;
}

.meta-ads-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Meta Hero Banner */
.meta-hero-card {
  background: linear-gradient(135deg, #1877F2 0%, #0056B3 100%);
  border-radius: 18px;
  padding: 24px 28px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(24, 119, 242, 0.25);
  gap: 20px;
}

.meta-hero-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.meta-hero-icon-box {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.meta-hero-title {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  letter-spacing: -0.3px;
}

.meta-live-badge {
  background: rgba(52, 199, 89, 0.25);
  border: 1px solid rgba(52, 199, 89, 0.4);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.meta-hero-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  margin: 4px 0 0 0;
  line-height: 1.45;
  max-width: 650px;
}

.meta-hero-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.meta-stat-pill {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
  text-align: center;
}

.meta-stat-num {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  color: #FFFFFF;
}

.meta-stat-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
  margin-top: 3px;
  color: #FFFFFF;
}

.meta-stat-val {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
}

/* Two Column Layout */
.meta-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.meta-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.meta-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meta-copy-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-code-input {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  background: #F8F9FA !important;
  color: #007AFF !important;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.meta-copy-btn {
  flex-shrink: 0;
  white-space: nowrap;
  gap: 5px;
  padding: 8px 12px;
  font-size: 12.5px;
}

.meta-payload-sample {
  background: #F8F9FB;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 4px;
}

/* Step-by-Step Meta Setup Guide */
.meta-steps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meta-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: #F8F9FA;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: background 0.15s ease;
}

.meta-step-item:hover {
  background: #F2F4F8;
}

.meta-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #007AFF;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.meta-step-content {
  flex: 1;
}

.meta-step-title {
  font-size: 13px;
  font-weight: 700;
  color: #1C1C1E;
  margin-bottom: 2px;
}

.meta-step-desc {
  font-size: 12px;
  color: #636366;
  line-height: 1.45;
}

@media (max-width: 1024px) {
  .meta-grid-2col {
    grid-template-columns: 1fr;
  }
  .meta-hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .meta-hero-stats {
    width: 100%;
    justify-content: flex-start;
  }
}

/* =============================================================================
   COMPANIES & MULTI-TENANT ONBOARDING SYSTEM (CRM SOTUVCHISI / SUPERADMIN)
   ============================================================================= */
.companies-workspace-scroll {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 24px 32px 60px 32px;
}

.companies-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.companies-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 18px;
}

.company-card-item {
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid var(--ios-border-subtle);
  padding: 20px 22px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.company-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.company-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.company-avatar {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, #FF9500, #FF6B00);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.25);
}

.company-title-info {
  flex: 1;
  min-width: 0;
}

.company-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #1C1C1E;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-industry {
  font-size: 12px;
  color: #8E8E93;
  display: flex;
  align-items: center;
  gap: 5px;
}

.license-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.license-active {
  background: #EAF8EE;
  color: #34C759;
}

.license-expiring {
  background: #FFF5E8;
  color: #FF9500;
}

.license-suspended {
  background: #FFECEB;
  color: #FF3B30;
}

.company-details-box {
  background: #F8F9FB;
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.company-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.company-detail-lbl {
  color: #8E8E93;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.company-detail-val {
  color: #1C1C1E;
  font-weight: 600;
}

.company-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #F2F2F7;
}

.onboard-section-card {
  background: #FFFFFF;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.onboard-sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1C1C1E;
}

.onboard-sec-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FF9500;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   1-Click Facebook Ads Integration (amoCRM-style OAuth)
   ============================================================ */
.meta-oauth-banner {
  background: #FFFFFF;
  border: 1.5px solid rgba(8, 102, 255, 0.22);
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(8, 102, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.meta-oauth-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0866FF, #00C6FF);
}

.meta-oauth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.meta-oauth-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}

.meta-fb-icon-lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0866FF, #0052CC);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(8, 102, 255, 0.35);
}

.meta-oauth-title {
  font-size: 17px;
  font-weight: 700;
  color: #1C1C1E;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-oauth-desc {
  font-size: 13px;
  color: #6C6C70;
  margin: 0;
  line-height: 1.45;
}

.meta-oauth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-fb-oauth {
  background: linear-gradient(135deg, #0866FF, #0056D2) !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  padding: 12px 22px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-shadow: 0 4px 16px rgba(8, 102, 255, 0.35) !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-fb-oauth:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(8, 102, 255, 0.45) !important;
}

.btn-fb-oauth:active {
  transform: scale(0.98);
}

.meta-connected-hero {
  background: #FFFFFF;
  border: 1.5px solid rgba(52, 199, 89, 0.3);
  border-radius: 18px;
  padding: 22px 26px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(52, 199, 89, 0.08);
  position: relative;
  overflow: hidden;
}

.meta-connected-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #34C759, #30D158);
}

.meta-connected-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.meta-page-avatar {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #EBF5FF;
  color: #0866FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 10px rgba(8, 102, 255, 0.15);
}

.meta-page-info {
  min-width: 0;
}

.meta-page-name {
  font-size: 16px;
  font-weight: 700;
  color: #1C1C1E;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-page-meta {
  font-size: 12px;
  color: #8E8E93;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-forms-chips-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.meta-form-chip {
  background: #F2F2F7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1C1C1E;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-form-chip.active {
  background: #EAF8EE;
  color: #34C759;
  border-color: rgba(52, 199, 89, 0.25);
}

/* ============================================================
   Vero CRM: Pipeline Deals & Manager Assignment Bar
   ============================================================ */
.pipeline-finance-strip {
  background: #FFFFFF;
  border-bottom: 1px solid var(--ios-border-subtle);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.finance-metrics-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.finance-chip {
  background: #F2F2F7;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.finance-chip:hover {
  background: #E5E5EA;
}

.finance-chip-label {
  color: #8E8E93;
  font-weight: 500;
}

.finance-chip-value {
  color: #1C1C1E;
  font-weight: 700;
}

.finance-chip.chip-won {
  background: #EAF8EE;
  border-color: rgba(52, 199, 89, 0.2);
}

.finance-chip.chip-won .finance-chip-label {
  color: #248A3D;
}

.finance-chip.chip-won .finance-chip-value {
  color: #34C759;
}

.finance-filters-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.manager-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.manager-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #8E8E93;
}

.manager-filter-select {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--ios-border-subtle);
  background: #F2F2F7;
  color: #1C1C1E;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.manager-filter-select:hover,
.manager-filter-select:focus {
  background: #FFFFFF;
  border-color: #007AFF;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

/* Column Amount Tag in Kanban Column Header */
.column-amount-tag {
  font-size: 11px;
  font-weight: 700;
  color: #8E8E93;
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Card Chips: Assignee, Deal Value & Call Status */
.card-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.lead-assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F2F2F7;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  color: #1C1C1E;
}

.lead-assignee-avatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #007AFF;
  color: #FFFFFF;
  font-size: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lead-unassigned-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: 1px dashed #C7C7CC;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
  color: #8E8E93;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lead-unassigned-btn:hover {
  border-color: #007AFF;
  color: #007AFF;
  background: rgba(0, 122, 255, 0.05);
}

.lead-deal-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #EAF8EE;
  border: 1px solid rgba(52, 199, 89, 0.25);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  color: #248A3D;
}

.lead-call-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
}

.lead-call-chip.call-answered {
  background: #EAF8EE;
  color: #248A3D;
  border: 1px solid rgba(52, 199, 89, 0.2);
}

.lead-call-chip.call-no_answer {
  background: #FFF4E5;
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.lead-call-chip.call-callback {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.lead-call-chip.call-busy {
  background: #F5F3FF;
  color: #7C3AED;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.lead-call-chip.call-rejected {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

/* ============================================================
   Lead Detail Modal: Assignee & Deal Amount Card
   ============================================================ */
.lead-assignee-deal-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #F9F9FB;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .lead-assignee-deal-card {
    grid-template-columns: 1fr;
  }
}

.lad-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lad-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #8E8E93;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.lad-assignee-row,
.lad-deal-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lad-select {
  flex: 1;
  height: 36px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  padding: 0 10px;
  background: #FFFFFF;
}

.btn-assign-me,
.btn-save-deal {
  height: 36px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #007AFF;
  border-radius: 9px;
  white-space: nowrap;
}

.lad-deal-input {
  flex: 1;
  height: 36px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 9px;
  padding: 0 10px;
  background: #FFFFFF;
  color: #1C1C1E;
}

.lad-currency-tag {
  font-size: 12px;
  font-weight: 700;
  color: #8E8E93;
}

.lad-deal-presets {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ============================================================
   Lead Detail Modal: Call Outcomes & Timeline
   ============================================================ */
.lead-calls-section {
  background: #FFFFFF;
  border: 1px solid var(--ios-border-subtle);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.calls-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calls-header-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #EFF6FF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calls-count-badge {
  font-size: 11px;
  font-weight: 700;
  background: #F2F2F7;
  color: #8E8E93;
  padding: 3px 8px;
  border-radius: 6px;
}

.call-outcome-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.btn-outcome {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
  outline: none;
}

.btn-outcome:hover {
  transform: translateY(-1px);
}

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

.btn-outcome.outcome-answered {
  background: #EAF8EE;
  color: #248A3D;
  border-color: rgba(52, 199, 89, 0.3);
}
.btn-outcome.outcome-answered:hover {
  background: #D4F4DC;
}

.btn-outcome.outcome-no-answer {
  background: #FFF4E5;
  color: #D97706;
  border-color: rgba(245, 158, 11, 0.3);
}
.btn-outcome.outcome-no-answer:hover {
  background: #FEE8CC;
}

.btn-outcome.outcome-callback {
  background: #EFF6FF;
  color: #2563EB;
  border-color: rgba(37, 99, 235, 0.3);
}
.btn-outcome.outcome-callback:hover {
  background: #DBEAFE;
}

.btn-outcome.outcome-busy {
  background: #F5F3FF;
  color: #7C3AED;
  border-color: rgba(124, 58, 237, 0.3);
}
.btn-outcome.outcome-busy:hover {
  background: #EDE9FE;
}

.btn-outcome.outcome-rejected {
  background: #FEF2F2;
  color: #DC2626;
  border-color: rgba(220, 38, 38, 0.3);
}
.btn-outcome.outcome-rejected:hover {
  background: #FEE2E2;
}

.call-note-input-row {
  margin-bottom: 12px;
}

.calls-timeline-wrap {
  border-top: 1px solid var(--ios-border-subtle);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.calls-timeline-empty {
  font-size: 12px;
  color: #8E8E93;
  text-align: center;
  padding: 10px 0;
}

.call-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #F9F9FB;
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
}

.call-timeline-badge {
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
}

.call-timeline-content {
  flex: 1;
}

.call-timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #8E8E93;
}

.call-timeline-note {
  margin-top: 3px;
  color: #1C1C1E;
  font-weight: 500;
}

/* =============================================================================
   CRM EGASI - INSPECTION MODE BANNER & SAAS PLATFORM VIEW
   ============================================================================= */
.inspection-mode-banner {
  background: linear-gradient(135deg, #1C1C1E, #2C2C2E);
  color: #FFFFFF;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #FF9500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 100;
  flex-shrink: 0;
  animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.inspection-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
}

.inspection-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FF9500;
  box-shadow: 0 0 0 0 rgba(255, 149, 0, 0.7);
  animation: pulseOrange 1.8s infinite;
  display: inline-block;
}

@keyframes pulseOrange {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 149, 0, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(255, 149, 0, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 149, 0, 0);
  }
}

.btn-exit-inspection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FF9500;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.4);
}

.btn-exit-inspection:hover {
  background: #FF8000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.5);
}

.platform-table-row {
  border-bottom: 1px solid var(--ios-border-subtle);
  transition: background 0.15s ease;
}

.platform-table-row:hover {
  background: #F9F9FB;
}

.platform-table-row td {
  padding: 13px 14px;
  vertical-align: middle;
}
