/* ==========================================================================
   Brite Marketing Mailer Suite - Dark Glassmorphism CSS Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-dark: #090d16;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.6);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);

  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
}

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

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 40%);
  background-attachment: fixed;
  overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

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

/* Sidebar */
.sidebar {
  width: 270px;
  min-width: 270px;
  height: 100vh;
  background: rgba(11, 17, 30, 0.95);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  user-select: none;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 20px 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Quick Send CTA Button in Sidebar */
.compose-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px var(--primary-glow);
  transition: all 0.2s ease;
  margin-bottom: 24px;
}

.compose-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

/* Nav Menu */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-item i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.05));
  border-left: 3px solid var(--primary);
  color: #ffffff;
}

/* Count Badges */
.badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.badge-primary { background: var(--primary); color: white; }
.badge-emerald { background: var(--accent-emerald); color: white; }
.badge-amber { background: var(--accent-amber); color: #000; }
.badge-muted { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

/* Sidebar Footer */
.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mode-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.mode-tag.sandbox {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.mode-tag.live {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  display: inline-block;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.3);
}

/* Top Header Bar */
.top-header {
  height: 64px;
  min-height: 64px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 17, 30, 0.95);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 20px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  width: 400px;
  color: var(--text-muted);
}
.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  width: 100%;
  font-size: 14px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.refresh-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.refresh-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* Content Body */
.content-body {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto !important;
  overflow-x: hidden;
  position: relative;
  height: calc(100vh - 64px);
  max-height: calc(100vh - 64px);
  padding-bottom: 90px !important;
  scroll-behavior: smooth;
}

.content-body::-webkit-scrollbar {
  width: 8px;
}
.content-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}
.content-body::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.25);
  border-radius: 6px;
}
.content-body::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-in-out forwards;
}
.tab-pane.active {
  display: block;
}

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

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Cards & Glass Panel */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

/* Tables & Mail Lists (Gmail Style) */
.mail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.mail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  gap: 16px;
  width: 100%;
}

.mail-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateX(2px);
}

.mail-item.unread {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid var(--primary);
}

.mail-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  width: 280px;
  min-width: 240px;
}

.mail-sender-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.mail-name-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.mail-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mail-email {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.mail-subject {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.mail-item.unread .mail-subject {
  color: var(--text-main);
  font-weight: 700;
}

.mail-meta-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.mail-action-btn {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mail-action-btn:hover {
  transform: scale(1.05);
}

.mail-date {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

.mail-count-badge {
  font-size: 10px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1;
}

.mail-count-badge.sent {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
}

.contacts-grid-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  width: 100%;
}

.conversation-grid-layout,
.conversation-stream-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.reply-composer-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.reply-card-highlight {
  box-shadow: 0 0 0 3px var(--accent-cyan), 0 12px 36px rgba(56, 189, 248, 0.25) !important;
  border-color: var(--accent-cyan) !important;
  transform: translateY(-2px);
}

.inline-msg-reply-container {
  animation: fadeInSlideDown 0.25s ease-out;
}

@keyframes fadeInSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.quick-reply-chip {
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-reply-chip:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: var(--accent-cyan) !important;
  color: var(--accent-cyan) !important;
}

.msg-footer-action-bar {
  transition: all 0.2s ease;
}

/* Delivery Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.status-pill.delivered { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-pill.opened { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.status-pill.clicked { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); border: 1px solid rgba(168, 85, 247, 0.3); }
.status-pill.pending { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-pill.bounced { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.3); }
.status-pill.spam { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid #ef4444; }

/* Outbox Delay Countdown Card */
.outbox-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.timer-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
}

/* Campaign Grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.campaign-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
}

.campaign-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.camp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.stat-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* A/B Testing & Rotation Pool Cards in Campaign View */
.ab-test-card, .pool-stats-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 10px;
  margin-bottom: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.ab-variants-grid, .pool-variants-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
}

.ab-variant-box, .pool-variant-box {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 6px;
  padding: 8px 10px;
  min-width: 0; /* CRITICAL: prevents grid item from expanding past card! */
  overflow: hidden;
  box-sizing: border-box;
}

.ab-variant-box.variant-a {
  border-left: 3px solid var(--accent-cyan);
}

.ab-variant-box.variant-b {
  border-left: 3px solid var(--accent-purple);
}

.ab-variant-box div, .pool-variant-box div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ab-variant-winner, .pool-variant-winner {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

/* Forms & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input, .form-select, .form-textarea {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.btn-danger:hover {
  background: var(--accent-rose);
  color: white;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #0f172a;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

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

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

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

/* Template Cards */
.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.template-card:hover {
  border-color: var(--accent-cyan);
}

.template-preview {
  height: 140px;
  background: #ffffff;
  color: #333;
  padding: 10px;
  font-size: 10px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

/* Attachments Pill List */
.attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.att-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}
.att-chip:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.merge-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 6px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  color: #c7d2fe;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.merge-tag-chip:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: #818cf8;
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================
   Bulk Toolbar & Checkboxes
   ========================================== */
.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.bulk-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ==========================================
   Pagination Controls
   ========================================== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px 4px 4px;
  margin-top: 10px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================
   Custom Glassmorphic Animated Confirm Dialog
   ========================================== */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
}

.custom-alert-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-alert-card {
  background: #0f172a;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  text-align: center;
  transform: scale(0.85);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-alert-overlay.active .custom-alert-card {
  transform: scale(1);
}

.custom-alert-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.custom-alert-icon.danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.custom-alert-icon.info {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.custom-alert-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.custom-alert-msg {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.custom-alert-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ==========================================
   Scrollable Conversation Chain Container
   ========================================== */
#conversationContainer {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

/* ==========================================================================
   Mobile Menu & Responsive Navigation Drawer
   ========================================================================== */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover, .mobile-menu-btn:active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #fff;
}

.mobile-sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-sidebar-close:hover {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.4);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Responsive Table Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Responsive Breakpoints System
   ========================================================================== */

/* Universal Overflows & Touch Smoothness */
* {
  -webkit-tap-highlight-color: transparent;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}

pre, code {
  word-break: break-all;
  white-space: pre-wrap;
}

/* 1. Tablets and Small Laptops (<= 992px) */
@media (max-width: 992px) {
  .app-container {
    position: relative;
    width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.85);
  }

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

  .sidebar-backdrop {
    display: block;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-sidebar-close {
    display: flex;
  }

  .top-header {
    padding: 0 16px;
    gap: 12px;
  }

  .search-bar {
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .content-body {
    padding: 16px;
    height: calc(100vh - 64px);
    max-height: calc(100vh - 64px);
  }

  .conversation-grid-layout,
  .conversation-stream-layout {
    width: 100% !important;
    gap: 16px !important;
  }
}

/* 2. Standard Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .top-header {
    height: 56px;
    min-height: 56px;
    padding: 0 12px;
    gap: 8px;
  }

  .content-body {
    padding: 14px 10px;
    height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
    width: 100%;
    overflow-x: hidden;
  }

  /* Mail Item Card Layout for Mobile */
  .mail-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 10px;
    gap: 8px;
    width: 100%;
  }

  .mail-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  .mail-sender-block {
    width: auto;
    min-width: 0;
    flex: 1;
    gap: 8px;
  }

  .mail-name-wrap {
    flex: 1;
    min-width: 0;
  }

  .mail-name {
    font-size: 13px;
    font-weight: 700;
  }

  .mail-email {
    display: none;
  }

  .mail-meta-block {
    gap: 6px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .mail-date {
    font-size: 11px;
    color: var(--text-dim);
  }

  .mail-item-body {
    width: 100%;
    padding-left: 28px;
  }

  .mail-subject {
    font-size: 13px;
    white-space: normal;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    word-break: break-word;
    line-height: 1.4;
  }

  /* Grid Layouts Stack Cleanly */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .contacts-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .form-row-2 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .camp-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  /* Bulk & Filter Toolbars */
  .bulk-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
  }

  .bulk-left, .bulk-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Modals */
  .modal-container {
    width: 96vw;
    max-width: 96vw;
    max-height: 94vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 16px 12px;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal-footer .btn {
    flex: 1;
    min-width: 120px;
  }

  /* Outbox Delay Card */
  .outbox-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }

  .outbox-card .timer-box {
    width: 100%;
    justify-content: center;
  }

  /* Section Title & Subtitle */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
  }

  .section-header .header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .section-header .header-actions .btn {
    flex: 1;
  }

  /* Conversation Chain Container */
  #conversationContainer {
    width: 100%;
  }

  /* Custom Alert Card */
  .custom-alert-card {
    width: 94%;
    padding: 20px 16px;
  }

  .custom-alert-actions {
    flex-direction: column;
    gap: 8px;
  }

  .custom-alert-actions .btn {
    width: 100%;
  }

  .glass-card {
    padding: 16px 14px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* 3. Small / Standard Mobile Phones (<= 480px) */
@media (max-width: 480px) {
  .top-header {
    height: 52px;
    min-height: 52px;
    padding: 0 8px;
    gap: 6px;
  }

  .mobile-menu-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 14px;
    border-radius: 6px;
  }

  .search-bar {
    padding: 4px 8px;
    gap: 6px;
    border-radius: 6px;
  }

  .search-bar i {
    font-size: 11px;
  }

  .search-bar input {
    font-size: 11px;
  }

  .search-bar input::placeholder {
    font-size: 11px;
  }

  .refresh-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 12px;
    border-radius: 6px;
  }

  #headerProfileBadge {
    padding: 2px;
    border: none;
    background: none;
  }

  #headerUserName {
    display: none;
  }

  #headerAvatarContainer {
    width: 28px !important;
    height: 28px !important;
  }

  .content-body {
    padding: 10px 8px;
  }

  .section-title {
    font-size: 17px;
  }

  .section-desc {
    font-size: 11px;
  }

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

  .brand-subtitle {
    font-size: 10px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .glass-card {
    padding: 14px 10px;
    border-radius: 10px;
  }

  .form-input, .form-select, .form-textarea {
    padding: 8px 10px;
    font-size: 13px;
  }

  /* Login Overlay Card */
  #loginOverlay .glass-card {
    padding: 24px 16px;
    margin: 10px;
    max-width: 95vw;
  }
}

/* 4. Ultra-Narrow Phones (<= 360px, e.g. 320px width) */
@media (max-width: 360px) {
  .top-header {
    padding: 0 4px;
    gap: 4px;
  }

  .mobile-menu-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 13px;
  }

  .search-bar {
    padding: 4px 6px;
  }

  .search-bar input {
    font-size: 10px;
  }

  .refresh-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 11px;
  }

  #headerAvatarContainer {
    width: 26px !important;
    height: 26px !important;
  }

  .content-body {
    padding: 8px 4px;
  }

  .mail-item {
    padding: 10px 6px;
    gap: 6px;
  }

  .mail-item-body {
    padding-left: 20px;
  }

  .mail-name {
    font-size: 12px;
  }

  .mail-subject {
    font-size: 12px;
  }

  .section-title {
    font-size: 15px;
  }

  .section-desc {
    font-size: 10px;
  }
}

/* 5. Large & Wide Displays (>= 1400px) */
@media (min-width: 1400px) {
  .content-body {
    max-width: 1600px;
  }
}

/* ========================================================
   SPINTAX & A/B TESTING COMPONENT STYLES
   ======================================================== */
.spintax-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.spintax-badge:hover {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.ab-test-card {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
}
.ab-variants-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}
.ab-variant-box {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.ab-variant-box.variant-a {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
}
.ab-variant-box.variant-b {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
}
.ab-variant-winner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

/* ==========================================
   MULTI-TEMPLATE ROTATION POOL STYLES
   ========================================== */
.rotation-pool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.rotation-pool-cards-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.pool-template-card {
  background: rgba(20, 30, 48, 0.7);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  padding: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.pool-template-card:hover {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}

.pool-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-wrap: wrap;
  gap: 8px;
}

.pool-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pool-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.pool-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pool-card-remove-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pool-card-remove-btn:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fee2e2;
}

.pool-card-remove-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Campaign Dashboard Multi-Template Rotation Stats Card */
.pool-stats-card {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
}

.pool-variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.pool-variant-box {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  transition: transform 0.15s ease;
}

.pool-variant-box:hover {
  transform: translateY(-1px);
  border-color: rgba(52, 211, 153, 0.4);
}

.pool-variant-box.top-converter {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.pool-variant-winner {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #34d399;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

/* ===================================================
   ENTERPRISE SUITE: SPAM CHECKER, QUOTA & BACKUP CSS
   =================================================== */

/* Top Header Manual Provider Switch (Brevo vs SendPulse) */
.provider-switch-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 3px 4px 3px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.provider-switch-wrap:hover {
  border-color: rgba(56, 189, 248, 0.35);
}

.provider-switch-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
}

.provider-switch-btns {
  display: flex;
  background: rgba(30, 41, 59, 0.85);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.provider-toggle-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.provider-toggle-btn:hover:not(.active) {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
}

.provider-toggle-btn.btn-brevo.active {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.provider-toggle-btn.btn-sendpulse.active {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}

@media (max-width: 768px) {
  .provider-switch-label span {
    display: none;
  }
  .provider-toggle-btn {
    padding: 3px 8px;
    font-size: 11px;
  }
}

/* Top Header Quota Pill */
.quota-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quota-pill:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

.quota-bar-mini {
  width: 50px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.quota-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.quota-bar-fill.quota-warning {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

/* Real-time Deliverability / Spam Score Pill */
.spam-score-pill {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  margin-bottom: 12px;
  transition: all 0.25s ease;
}

.spam-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.spam-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
}

.spam-score-badge.excellent {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.spam-score-badge.moderate {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.spam-score-badge.high_risk {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  animation: pulseRisk 2s infinite;
}

@keyframes pulseRisk {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.spam-triggers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.spam-trigger-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.spam-suggestion-text {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.4;
}

/* Backup Card */
.backup-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .backup-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Custom Business Hours & Delivery Schedule */
.day-toggles-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.day-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.day-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(56, 189, 248, 0.4);
}

.day-toggle-btn.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(99, 102, 241, 0.25));
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.schedule-preview-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  line-height: 1.4;
}

/* Skipped Leads Modal Custom Scrollbar */
#skippedLeadsTableScrollContainer {
  scrollbar-width: thin;
  scrollbar-color: #334155 #0b1329;
}

#skippedLeadsTableScrollContainer::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#skippedLeadsTableScrollContainer::-webkit-scrollbar-track {
  background: #0b1329;
  border-radius: 4px;
}

#skippedLeadsTableScrollContainer::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

#skippedLeadsTableScrollContainer::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* ========================================================
   EXECUTIVE ULTRA-PREMIUM SAAS LOGIN OVERLAY
   ======================================================== */
.login-overlay-wrap {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #070b19;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  perspective: 1000px;
}

/* Ambient Floating Glow Orbs (Aurora Effect) */
.login-ambient-grid {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.18) 0%, transparent 60%);
  background-size: 28px 28px, 100% 100%;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.55;
  will-change: transform;
}

.ambient-orb-1 {
  top: 10%;
  left: 15%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #6366f1 0%, rgba(99, 102, 241, 0) 70%);
  animation: orbDrift1 22s ease-in-out infinite alternate;
}

.ambient-orb-2 {
  bottom: 12%;
  right: 15%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, #06b6d4 0%, rgba(6, 182, 212, 0) 70%);
  animation: orbDrift2 26s ease-in-out infinite alternate;
}

.ambient-orb-3 {
  top: 45%;
  right: 35%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #ec4899 0%, rgba(236, 72, 153, 0) 70%);
  opacity: 0.25;
  animation: orbDrift3 18s ease-in-out infinite alternate;
}

@keyframes orbDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

@keyframes orbDrift2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-70px, -50px) scale(1.15); }
  100% { transform: translate(30px, -90px) scale(0.9); }
}

@keyframes orbDrift3 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, 60px) scale(1.2); }
}

/* Glass Card Container */
.login-card-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 38px 34px 30px;
  box-shadow: 
    0 30px 70px -10px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 40px -10px rgba(99, 102, 241, 0.25);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  text-align: center;
  z-index: 10;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Status Pill */
.login-live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  color: #34d399;
  letter-spacing: 0.3px;
  margin-bottom: 20px;
}

.login-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulseBeacon 2s ease-in-out infinite;
}

@keyframes pulseBeacon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.5; }
}

/* Brand Logo Box */
.login-brand-frame {
  margin: 0 auto 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.login-brand-frame img {
  max-height: 48px;
  max-width: 180px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.login-title-text {
  font-size: 21px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.3px;
  margin: 0 0 6px;
}

.login-subtitle-text {
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 24px;
  line-height: 1.5;
}

.login-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-field-wrap .field-leading-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  font-size: 14px;
  pointer-events: none;
  transition: color 0.2s;
}

.login-field-wrap input:focus ~ .field-leading-icon {
  color: #38bdf8;
}

.login-input-styled {
  width: 100%;
  padding: 12px 14px 12px 40px !important;
  background: rgba(11, 19, 41, 0.75) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 10px !important;
  color: #f8fafc !important;
  font-size: 13px !important;
  transition: all 0.25s ease !important;
}

.login-input-styled:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
  background: rgba(15, 23, 42, 0.95) !important;
}

.login-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 22px;
  font-size: 12px;
}

.login-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  margin: 0;
}

.login-remember-label input[type="checkbox"] {
  accent-color: #38bdf8;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.login-recovery-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.login-recovery-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

.login-submit-btn {
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.45);
  transition: all 0.25s ease;
}

.login-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -5px rgba(6, 182, 212, 0.55);
}

.login-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.login-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Feature Badges below card */
.login-feature-ribbon {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.login-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.login-feature-chip i {
  color: #38bdf8;
  font-size: 10px;
}

.login-copyright-text {
  margin-top: 18px;
  font-size: 11px;
  color: #475569;
  letter-spacing: 0.2px;
}

/* ========================================================
   CSC STUDENT ACCEPTANCE HUB STYLES (COMPACT & RESPONSIVE)
   ======================================================== */
.csc-header-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.csc-header-content {
  flex: 1;
  min-width: 280px;
}

.csc-suite-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.csc-header-title {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}

.csc-header-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
  max-width: 650px;
}

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

.csc-btn-sm {
  padding: 8px 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Compact Stats Row */
.csc-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 1024px) {
  .csc-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .csc-stats-row {
    grid-template-columns: 1fr;
  }
}

.csc-stat-chip {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.csc-stat-chip:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.csc-stat-chip.chip-blue { border-left: 3px solid #38bdf8; }
.csc-stat-chip.chip-emerald { border-left: 3px solid #34d399; }
.csc-stat-chip.chip-amber { border-left: 3px solid #fbbf24; }
.csc-stat-chip.chip-purple { border-left: 3px solid #c084fc; }

.csc-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.chip-blue .csc-stat-icon { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.chip-emerald .csc-stat-icon { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.chip-amber .csc-stat-icon { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.chip-purple .csc-stat-icon { background: rgba(192, 132, 252, 0.15); color: #c084fc; }

.csc-stat-data {
  flex: 1;
  min-width: 0;
}

.csc-stat-val {
  font-size: 19px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.1;
}

.csc-stat-lbl {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Sub-Nav Bar */
.csc-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.csc-nav-pills {
  display: flex;
  gap: 8px;
}

.csc-pill-btn {
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

.csc-isolation-badge {
  font-size: 11.5px;
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

/* Compact Modern Empty Card */
.csc-empty-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.csc-empty-icon {
  font-size: 28px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.csc-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.csc-empty-desc {
  font-size: 12px;
  color: #94a3b8;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

.csc-empty-cta {
  padding: 8px 18px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  margin-top: 4px;
}

.student-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.student-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  opacity: 0.8;
}

.student-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 16px 35px -8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.15);
}

.student-avatar-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #38bdf8;
  font-weight: 700;
  flex-shrink: 0;
}

.student-gmail-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(234, 67, 53, 0.1);
  border: 1px solid rgba(234, 67, 53, 0.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #fca5a5;
  margin-top: 8px;
  word-break: break-all;
}

.student-gmail-pill i {
  color: #ea4335;
}

.student-docs-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 11px;
  color: #94a3b8;
}

.student-action-btn-group {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==============================================================================
   REGION FOLDERS & HIERARCHICAL ACCORDION SYSTEM (ENTERPRISE CRM)
   ============================================================================== */
.region-folder-card {
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.45);
  overflow: hidden;
  transition: all 0.2s ease;
}

.region-folder-card:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

.region-folder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.55);
  user-select: none;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.region-folder-header:hover {
  background: rgba(56, 189, 248, 0.1);
  border-left-color: #38bdf8;
}

.region-folder-header.active-region {
  border-left-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.region-folder-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.region-folder-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-weight: 600;
}

.region-folder-toggle-icon {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.2s ease;
  display: inline-block;
  width: 14px;
  text-align: center;
}

.region-folder-toggle-icon.expanded {
  transform: rotate(90deg);
  color: #38bdf8;
}

.region-folder-content {
  padding: 4px 6px 6px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(10, 15, 29, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.region-group-item {
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  padding-left: 10px !important;
  transition: all 0.15s ease;
}

.region-group-item:hover {
  border-left-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.region-group-item.active {
  border-left-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.15) !important;
}

/* CAMPAIGN REGION FILTER TABS */
.campaign-region-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px 2px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.campaign-region-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.campaign-region-tab:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.campaign-region-tab.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(99, 102, 241, 0.35));
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.campaign-region-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}



