/* ==========================================================================
   Notify Hub — Full Interactive High-End Utilitarian Design System (.agents)
   ========================================================================== */
:root, .page-wrapper, .container {
  --bg: #EEF3F9;
  --bg-mesh: radial-gradient(at 0% 0%, rgba(67, 36, 139, 0.04) 0px, transparent 50%),
             radial-gradient(at 100% 100%, rgba(53, 164, 119, 0.03) 0px, transparent 50%),
             #EEF3F9;
  --surface: #FFFFFF;
  --surface-raised: #F8FAFD;
  --surface-inset: #F0F4F9;
  --surface-border: #E2E8F0;

  --ink: #172033;
  --ink-secondary: #475569;
  --muted: #687386;
  --line: #CBD3DE;
  --line-subtle: #E3E9F1;

  --accent: #43248B;
  --brand: #43248B;
  --accent-hover: #351C70;
  --accent-soft: #F0ECFA;
  --accent-soft-hover: #E6DEF7;
  --lavender: #5B43A6;
  --lavender-soft: #F4F1FB;

  --success: #35A477;
  --success-soft: #E8F7F0;
  --success-text: #1E6B4B;

  --coral: #D97763;
  --coral-soft: #FFF2EF;
  --coral-text: #9E3F2D;

  --amber: #B45309;
  --amber-soft: #FEF3C7;

  --radius-outer: 18px;
  --radius-inner: 12px;
  --radius-pill: 9999px;

  --shadow-subtle: 0 1px 3px rgba(23, 32, 51, 0.04), 0 4px 12px rgba(23, 32, 51, 0.03);
  --shadow-elevated: 0 12px 36px -8px rgba(44, 62, 91, 0.08), 0 4px 12px rgba(44, 62, 91, 0.03);
  --shadow-modal: 0 25px 50px -12px rgba(23, 32, 51, 0.25);

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-tactile: cubic-bezier(0.32, 0.72, 0, 1);
}

.page-wrapper {
  background: var(--bg-mesh);
  min-height: 100vh;
  width: 100%;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  transition: all 0.3s var(--ease-spring);
}

.topbar-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.topbar-right {
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font: 700 11px 'IBM Plex Mono', monospace;
  box-shadow: 0 2px 6px rgba(67, 36, 139, 0.25);
}

.brand-name {
  font: 750 15px 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-sep {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font: 600 10.5px 'IBM Plex Mono', monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

h1.page-heading {
  font: 750 32px/1.1 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 6px;
}

p.page-subline {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 400;
  max-width: 680px;
}

/* Hub Segmented Nav Controller */
.nav-island {
  display: inline-flex;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-subtle);
  gap: 4px;
}

.nav-tab-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.18s var(--ease-spring);
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
}

.nav-tab-btn:hover {
  color: var(--ink);
  background: var(--surface-inset);
}

.nav-tab-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(67, 36, 139, 0.08);
}

/* ==========================================================================
   Double-Bezel Card Enclosure
   ========================================================================== */
.bezel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
  position: relative;
}

.bezel-card-inner {
  padding: 24px;
}

/* ==========================================================================
   Workspace Layout (Composer Grid)
   ========================================================================== */
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.85fr);
  gap: 24px;
  align-items: start;
}

/* ==========================================================================
   Channel Switcher & Forms
   ========================================================================== */
.channel-switcher-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  background: var(--surface-inset);
  border-bottom: 1px solid var(--line);
}

.channel-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  transition: all 0.2s var(--ease-spring);
}

.channel-btn:hover {
  background: rgba(255, 255, 255, 0.6);
}

.channel-btn.active {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-subtle);
}

.channel-btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-tactile);
}

.channel-btn.active .channel-btn-icon {
  transform: scale(1.04);
}

.channel-btn:nth-child(2) .channel-btn-icon {
  background: var(--lavender-soft);
  color: var(--lavender);
}

.channel-btn-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.channel-btn-text small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.form-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.form-section-title {
  font: 700 18px 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
}

.form-section-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
}

.input-group {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.input-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 4px;
}

.required-mark {
  color: var(--coral);
}

.text-input, .textarea-input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.text-input:focus, .textarea-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.textarea-input {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

.composer-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.btn-sms-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.btn-sms-link:hover {
  background: var(--surface-inset);
  border-color: var(--accent-soft-hover);
  color: var(--accent);
}

.preview-msg-link {
  color: #E0F2FE; /* Light blue/cyan */
  text-decoration: underline;
  font-weight: 500;
}

.preview-msg-link:hover {
  color: #FFFFFF;
}

.composer-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.counter-badge {
  font: 600 11px 'IBM Plex Mono', monospace;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.counter-badge.badge-unicode {
  color: #D97706;
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.sms-encoding-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.encoding-gsm {
  color: var(--muted);
  background: var(--surface-inset);
  border: 1px solid var(--line);
}

.encoding-turkish {
  color: #2563EB;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.encoding-unicode {
  color: #D97706;
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.28);
  animation: pulse-border 2s infinite ease-in-out;
}

.remaining-counter {
  opacity: 0.85;
  font-weight: 500;
}

/* Email Designer Studio Mockup */
.email-designer-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: var(--surface-inset);
  overflow: hidden;
  margin-bottom: 20px;
}

.designer-tab-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 6px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.designer-tab-item {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  transition: all 0.18s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
}

.designer-tab-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: var(--muted);
}

.designer-tab-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.designer-canvas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: 14px;
  padding: 16px;
}

.email-stage-canvas {
  min-height: 280px;
  padding: 16px;
  background: #FFFFFF;
  border: 1px dashed #B6C1CE;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.canvas-block-node {
  position: relative;
  border: 1px solid #CBD3DE;
  border-radius: 8px;
  background: #FFFFFF;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--accent);
  padding: 14px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.canvas-block-node:hover, .canvas-block-node.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.canvas-block-node small {
  position: absolute;
  top: 6px;
  right: 8px;
  font: 500 9px 'IBM Plex Mono', monospace;
  color: var(--muted);
}

.canvas-logo-node {
  min-height: 48px;
  font: 700 14px 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.01em;
}

.canvas-copy-node {
  min-height: 70px;
  color: var(--muted);
  font-size: 11px;
  gap: 4px;
}

.canvas-copy-node strong {
  font: 750 15px 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
}

.canvas-action-node {
  min-height: 56px;
}

.canvas-action-btn {
  background: var(--accent);
  color: #FFFFFF;
  border-radius: 7px;
  padding: 8px 18px;
  font-size: 11px;
  font-weight: 700;
}

.block-palette-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-content: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.palette-title {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.palette-tool-btn {
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.palette-tool-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

.code-editor-box {
  margin: 14px;
  background: #181E2C;
  border: 1px solid #2B3347;
  border-radius: 10px;
  padding: 14px 0;
  font: 400 11px/1.9 'IBM Plex Mono', monospace;
  color: #E2E8F0;
  overflow-x: auto;
}

.code-editor-line {
  display: flex;
  padding: 0 14px;
}

.code-line-num {
  width: 24px;
  color: #64748B;
  user-select: none;
  flex-shrink: 0;
}

.code-tag { color: #F472B6; }
.code-attr { color: #93C5FD; }
.code-val { color: #FDE047; }

/* Action Strip */
.action-strip {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.action-strip .btn-primary,
.action-strip .btn-secondary {
  height: 40px;
  box-sizing: border-box;
}

#btn-cancel-send {
  height: 40px !important;
  width: auto !important;
  min-width: 130px !important;
  max-width: none !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

#btn-exclude-and-send {
  height: 40px !important;
  width: 290px !important;
  min-width: 290px !important;
  max-width: 290px !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #FFFFFF;
  height: 40px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  transition: all 0.18s var(--ease-spring);
  box-shadow: 0 2px 6px rgba(67, 36, 139, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67, 36, 139, 0.25);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled,
.btn-primary[disabled] {
  background: var(--surface-inset) !important;
  color: var(--muted) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  opacity: 0.65 !important;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  color: var(--ink);
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  box-sizing: border-box;
  transition: all 0.18s var(--ease-spring);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-secondary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-secondary:disabled,
.btn-secondary[disabled] {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
  border-color: var(--line) !important;
  color: var(--muted) !important;
}

/* ==========================================================================
   Live Previews
   ========================================================================== */
.preview-container {
  margin-top: 24px;
  padding: 20px;
  background: var(--surface-inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
}

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

.preview-title {
  font: 700 13px 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
}

.preview-pill {
  font: 600 10.5px 'IBM Plex Mono', monospace;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 6px;
}

/* iPhone Chassis */
.iphone-frame {
  max-width: 310px;
  margin: 0 auto;
  background: #E2E4E9;
  border-radius: 36px;
  padding: 10px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.iphone-screen {
  background: #FFFFFF;
  border-radius: 28px;
  padding: 12px 14px 20px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.iphone-notch-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 600 10px -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111827;
  padding: 0 4px 8px;
}

.iphone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #F3F4F6;
  font-size: 12px;
}

.iphone-back-chevron {
  color: #007AFF;
  font-size: 20px;
  line-height: 1;
  font-weight: 300;
}

.iphone-contact-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 14px;
}

.iphone-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #8E8E93;
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}

.iphone-sender-name {
  font-size: 11px;
  font-weight: 600;
  color: #111827;
}

.iphone-bubble-cluster {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.iphone-msg-bubble {
  background: #34C759;
  background: linear-gradient(180deg, #34C759 0%, #30B753 100%);
  color: #FFFFFF;
  padding: 10px 14px;
  border-radius: 18px 18px 4px 18px;
  font-size: 12px;
  line-height: 1.45;
  max-width: 230px;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Email Card Preview */
.email-card-preview {
  max-width: 480px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.email-card-preview-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface-inset);
  border-bottom: 1px solid var(--line);
  font: 600 11px 'IBM Plex Mono', monospace;
  color: var(--muted);
}

.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}

.email-card-body {
  padding: 20px;
  min-height: 180px;
}

.email-preview-subject-line {
  font: 700 16px 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-subtle);
}

.email-preview-body-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-secondary);
  white-space: pre-wrap;
}

/* ==========================================================================
   Dynamic Template Section Actions (Reorder & Delete)
   ========================================================================== */
.section-item-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

.section-btn-arrow,
.section-btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line-subtle);
  background: var(--surface, #ffffff);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  transition: all 0.15s ease;
  padding: 0;
}

.section-btn-arrow:hover:not(:disabled) {
  background: var(--surface-inset, #f3f4f6);
  color: var(--ink);
  border-color: var(--line);
}

.section-btn-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.section-btn-delete {
  color: #ef4444;
  background: #fef2f2;
  border-color: #fecaca;
  font-size: 13px;
  font-weight: 700;
}

.section-btn-delete:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #dc2626;
  transform: scale(1.08);
}

/* ==========================================================================
   Audience Panel (Right Rail) — Fully Interactive
   ========================================================================== */
.audience-card {
  position: sticky;
  top: 24px;
}

.audience-title {
  font: 700 18px 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
}

.audience-subline {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.channel-restriction-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 12px;
  background: var(--amber-soft);
  border: 1px solid rgba(180, 83, 9, 0.25);
  border-radius: 8px;
  line-height: 1.45;
}

.restriction-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.restriction-content {
  flex: 1;
}

.restriction-title {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--amber);
  font-size: 12px;
}

.restriction-text {
  margin: 0;
  font-size: 11.5px;
  color: #78350F;
}

.source-tabs-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 16px 0;
  padding: 4px;
  background: var(--surface-inset);
  border-radius: 10px;
  border: 1px solid var(--line-subtle);
}

.source-tab-btn {
  padding: 8px 6px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  transition: all 0.15s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
}

.source-tab-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.source-tab-lock {
  font-size: 10px;
  margin-left: 2px;
  display: inline-block;
  vertical-align: middle;
}

.source-tab-btn.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-field-wrap {
  position: relative;
  margin-bottom: 12px;
}

.search-field-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}

.search-field-wrap input {
  padding-left: 34px;
  padding-right: 36px;
  height: 38px;
  font-size: 12.5px;
}

.search-field-icon-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.search-field-icon-btn:hover {
  background: #F1F5F9;
  color: var(--brand, #4338CA);
}

.search-field-icon-btn:active {
  background: #E2E8F0;
  transform: translateY(-50%) scale(0.95);
}

.selected-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 8px 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.chip-tag button {
  font-size: 13px;
  line-height: 1;
  color: var(--accent);
  cursor: pointer;
}

.chip-tag--unconsented {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid rgba(180, 83, 9, 0.25);
}

.chip-tag--unconsented button {
  color: var(--amber);
}

.consent-warning-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid rgba(180, 83, 9, 0.25);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  cursor: help;
  user-select: none;
  line-height: 1.2;
  white-space: nowrap;
}

.user-select-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface);
}

.user-row-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-subtle);
  cursor: pointer;
  transition: background 0.12s ease;
}

.user-row-item:last-child {
  border-bottom: none;
}

.user-row-item:hover {
  background: var(--surface-inset);
}

.user-row-item.is-selected {
  background: var(--accent-soft);
}

.user-row-item.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.user-row-item.is-disabled:hover {
  background: none;
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-details strong {
  display: block;
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-details small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.row-checkbox {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

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

.sub-pager-btns {
  display: flex;
  gap: 4px;
}

.sub-pager-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-subtle);
  border-radius: 6px;
  background: var(--surface-raised);
  font-size: 11px;
  color: var(--ink-light);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
}

.sub-pager-btn:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft);
}

.sub-pager-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
  font-weight: 700;
}

.sub-pager-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* Segments */
.segment-stack {
  display: grid;
  gap: 8px;
}

.segment-item-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s ease;
}

.segment-item-box.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.segment-glyph {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--lavender-soft);
  color: var(--lavender);
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}

.segment-info {
  flex: 1;
}

.segment-info strong {
  display: block;
  font-size: 12px;
  color: var(--ink);
}

.segment-info small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

/* Excel Upload */
/* Excel Drop Zone — Fixed Dimension (200px) & Polished States */
.excel-drop-zone {
  width: 100%;
  height: 200px;
  min-height: 200px;
  max-height: 200px;
  box-sizing: border-box;
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* Empty State */
.excel-drop-zone--empty {
  border: 1.5px dashed var(--line);
  background: var(--surface-inset);
  justify-content: space-between;
}

.excel-drop-zone--empty:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.excel-pill-neutral {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: -0.01em;
}

.status-dot--neutral {
  background: var(--muted);
  box-shadow: none;
  animation: none;
}

.excel-empty-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2px 0;
}

.excel-icon-tile--empty {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(67, 36, 139, 0.07) 0%, rgba(67, 36, 139, 0.14) 100%);
  color: var(--accent);
  box-shadow: none;
  border: 1px solid rgba(67, 36, 139, 0.12);
  margin: 0 auto 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.excel-empty-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 1px;
  line-height: 1.2;
}

.excel-empty-sub {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
  margin: 3px auto 0;
  max-width: 270px;
}

.excel-btn-sample {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.excel-btn-sample:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

.excel-btn-choose {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(67, 36, 139, 0.2);
}

.excel-btn-choose:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 3px 8px rgba(67, 36, 139, 0.3);
  transform: translateY(-1px);
}

/* Loading State — Custom Tailored & Proportional (200px) */
.excel-drop-zone--loading {
  background: var(--surface);
  border: 1.5px solid rgba(67, 36, 139, 0.22);
  box-shadow: 0 4px 16px rgba(67, 36, 139, 0.05);
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.excel-loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(67, 36, 139, 0.2);
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: -0.01em;
}

.excel-spinner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(67, 36, 139, 0.7);
  animation: loadingDotPulse 1.5s infinite;
}

@keyframes loadingDotPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(67, 36, 139, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(67, 36, 139, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(67, 36, 139, 0); }
}

.excel-loading-pct-badge {
  font-size: 11px;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(67, 36, 139, 0.2);
  padding: 1px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.excel-loading-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 0 4px;
}

.excel-icon-tile--loading {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, #5B43A6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(67, 36, 139, 0.25);
  margin-bottom: 5px;
}

.excel-spin-svg {
  animation: spin 0.85s linear infinite;
}

.excel-loading-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 270px;
}

.excel-loading-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 270px;
}

.excel-loading-bottom {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  align-items: center;
}

.excel-loading-track {
  width: 100%;
  height: 6px;
  background: var(--surface-inset);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line-subtle);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.excel-loading-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #7c3aed 100%);
  border-radius: 9999px;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.excel-loading-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  animation: barShimmer 1.6s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.excel-loading-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.2;
}

.excel-loading-note span {
  font-size: 11px;
}

/* Loaded State */
.excel-drop-zone--loaded {
  background: linear-gradient(180deg, #ffffff 0%, rgba(240, 253, 244, 0.5) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  justify-content: space-between;
}

.excel-drop-zone--loaded:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.12);
}

/* Top Bar */
.excel-loaded-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.excel-pill-ready {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: -0.01em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: statusPulse 2s infinite;
}

.status-dot--error {
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(217, 119, 99, 0.7);
  animation: statusPulseError 2s infinite;
}

.status-dot--warning {
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7);
  animation: statusPulseWarning 2s infinite;
}

@keyframes statusPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes statusPulseError {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 119, 99, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(217, 119, 99, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 119, 99, 0); }
}

@keyframes statusPulseWarning {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(217, 119, 6, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

.excel-format-pill {
  font-size: 10px;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  color: #065f46;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 1px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

/* Middle File Item */
.excel-loaded-main {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
  width: 100%;
  box-sizing: border-box;
}

.excel-icon-tile {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
}

.excel-icon-tile--error {
  background: linear-gradient(135deg, var(--coral) 0%, #b91c1c 100%);
  box-shadow: 0 3px 8px rgba(217, 119, 99, 0.3);
}

.excel-icon-tile--warning {
  background: linear-gradient(135deg, var(--amber) 0%, #d97706 100%);
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.3);
}

.excel-file-details {
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow: hidden;
  flex: 1;
}

.excel-file-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.excel-file-stats {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 11px;
}

.excel-stat-highlight {
  font-weight: 700;
  color: #047857;
}

.excel-stat-separator {
  color: var(--muted);
  font-size: 10px;
}

.excel-stat-check {
  color: var(--muted);
}

.excel-file-desc-error {
  font-size: 11px;
  color: var(--coral-text);
  line-height: 1.3;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.excel-file-desc-warning {
  font-size: 11px;
  color: #92400e;
  line-height: 1.3;
  margin-top: 2px;
}

/* Actions Row */
.excel-loaded-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.excel-btn-action {
  height: 35px;
  flex: 1;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-sizing: border-box;
  text-decoration: none;
  transition: all 0.16s ease;
  padding: 0 10px;
}

.excel-btn-change {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.excel-btn-change:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

.excel-btn-clear {
  background: var(--coral-soft);
  border: 1px solid rgba(217, 119, 99, 0.3);
  color: var(--coral-text);
}

.excel-btn-clear:hover {
  background: #fee2e2;
  border-color: var(--coral);
  color: #b91c1c;
  transform: translateY(-1px);
}

/* Error and Warning Dropzone Variants */
.excel-drop-zone--error {
  background: linear-gradient(180deg, #ffffff 0%, rgba(254, 242, 242, 0.6) 100%);
  border: 1.5px solid rgba(217, 119, 99, 0.4);
  box-shadow: 0 2px 12px rgba(217, 119, 99, 0.08);
  justify-content: space-between;
}

.excel-drop-zone--warning {
  background: linear-gradient(180deg, #ffffff 0%, rgba(254, 243, 199, 0.5) 100%);
  border: 1.5px solid rgba(217, 119, 6, 0.35);
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.08);
  justify-content: space-between;
}

.excel-pill-error {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--coral-text);
  background: var(--coral-soft);
  border: 1px solid rgba(217, 119, 99, 0.3);
  padding: 2px 9px;
  border-radius: 999px;
}

.excel-pill-warning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  background: var(--amber-soft);
  border: 1px solid rgba(217, 119, 6, 0.25);
  padding: 2px 9px;
  border-radius: 999px;
}

.excel-format-pill--error {
  color: var(--coral-text);
  background: var(--coral-soft);
  border-color: rgba(217, 119, 99, 0.3);
}

.excel-format-pill--warning {
  color: #92400e;
  background: var(--amber-soft);
  border-color: rgba(217, 119, 6, 0.25);
}

.btn-danger-soft {
  border-color: var(--coral) !important;
  color: var(--coral-text) !important;
  background: var(--coral-soft) !important;
}

.btn-danger-soft:hover:not(:disabled) {
  border-color: var(--coral) !important;
  color: #fff !important;
  background: var(--coral) !important;
}

.excel-requirement-callout {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--coral-soft);
  color: var(--coral-text);
  font-size: 11px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.45;
}

.import-feedback-box {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 11.5px;
  line-height: 1.5;
}

.audience-footer-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
  display: flex;
  gap: 6px;
  line-height: 1.45;
}

/* ==========================================================================
   Sent History Views (SMS & E-Posta Tables)
   ========================================================================== */
.history-view-section {
  animation: fadeIn 0.25s var(--ease-spring);
}

.history-toolbar-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}

.history-filter-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-elevated);
  margin-bottom: 18px;
  position: relative;
  z-index: 50;
  flex-wrap: wrap;
}

.history-data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: var(--surface);
}

.history-data-table {
  width: 100%;
  min-width: 780px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}

.history-data-table th {
  padding: 12px 14px;
  text-align: left;
  background: var(--surface-inset);
  color: var(--muted);
  font: 700 10.5px 'IBM Plex Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.history-data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: middle;
}

.history-data-table tbody tr {
  transition: background 0.12s ease;
}

.history-data-table tbody tr:hover {
  background: var(--surface-raised);
}

.history-data-table th:nth-child(1), .history-data-table td:nth-child(1) { width: 20%; }
.history-data-table th:nth-child(2), .history-data-table td:nth-child(2) { width: 20%; }
.history-data-table th:nth-child(3), .history-data-table td:nth-child(3) { width: 32%; }
.history-data-table th:nth-child(4), .history-data-table td:nth-child(4) { width: 20%; }
.history-data-table th:nth-child(5), .history-data-table td:nth-child(5) { width: 8%; text-align: center; }

.id-badge-code {
  font: 600 11px 'IBM Plex Mono', monospace;
  color: var(--muted);
}

.sender-cell {
  display: flex;
  flex-direction: column;
}

.sender-cell strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.sender-cell small {
  font-size: 10.5px;
  color: var(--muted);
}

.subject-cell-text {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-eye-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  transition: all 0.15s var(--ease-spring);
  cursor: pointer;
}

.action-eye-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.06);
}

.pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 11.5px;
  color: var(--muted);
}

.pager-btn-cluster {
  display: flex;
  gap: 5px;
}

.pager-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  transition: all 0.12s ease;
}

.pager-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.pager-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

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

/* ==========================================================================
   Detail View
   ========================================================================== */
.detail-view-container {
  animation: fadeIn 0.2s var(--ease-spring);
}

.detail-nav-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.detail-meta-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
}

.detail-meta-card span {
  display: block;
  font: 600 10px 'IBM Plex Mono', monospace;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-meta-card strong {
  display: block;
  margin-top: 6px;
  font: 700 14px 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
}

.detail-body-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-outer);
  padding: 24px;
}

.detail-body-box h3 {
  font: 750 20px 'Bricolage Grotesque', sans-serif;
  margin: 6px 0 16px;
  color: var(--ink);
}

.detail-message-frame {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-inset);
  line-height: 1.7;
  white-space: pre-wrap;
  font-size: 13.5px;
  color: var(--ink);
}

.email-detail-iframe {
  width: 100%;
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  display: block;
}

/* ==========================================================================
   Validation Review & Confirmation Flow
   ========================================================================== */
.review-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.review-kpi-grid.has-three-tiles {
  grid-template-columns: repeat(3, 1fr);
}

.review-kpi-grid.has-four-tiles {
  grid-template-columns: repeat(4, 1fr);
}

.review-kpi-grid.has-five-tiles {
  grid-template-columns: repeat(5, 1fr);
}

.review-kpi-grid.has-six-tiles {
  grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1100px) {
  .review-kpi-grid.has-six-tiles,
  .review-kpi-grid.has-five-tiles,
  .review-kpi-grid.has-four-tiles {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

.kpi-tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  padding: 16px 18px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.kpi-tile.is-interactive {
  cursor: pointer;
  user-select: none;
}

.kpi-tile.is-interactive:hover {
  border-color: #94A3B8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.kpi-tile.is-active {
  border-color: var(--accent);
  background: #F8FAFC;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.kpi-tile.is-active.deliverable-active {
  border-color: #16A34A;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
}

.kpi-tile.is-active.duplicate-active {
  border-color: #6366F1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.kpi-tile.is-active.format-active,
.kpi-tile.is-active.excluded-active {
  border-color: var(--coral);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

.kpi-tile.is-active.consent-active {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25);
}

.kpi-active-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 10px;
  background: #E2E8F0;
  color: #334155;
}

.is-active.deliverable-active .kpi-active-badge {
  background: #DCFCE7;
  color: #15803D;
}

.is-active.duplicate-active .kpi-active-badge {
  background: #EEF2FF;
  color: #4F46E5;
}

.is-active.format-active .kpi-active-badge,
.is-active.excluded-active .kpi-active-badge {
  background: #FEE2E2;
  color: #B91C1C;
}

.is-active.consent-active .kpi-active-badge {
  background: #FEF3C7;
  color: #B45309;
}

tr.duplicate-cell-highlight {
  background-color: rgba(99, 102, 241, 0.035);
}

.kpi-tile strong {
  display: block;
  font: 750 28px 'Bricolage Grotesque', sans-serif;
  color: var(--accent);
}

.kpi-tile span {
  font-size: 11.5px;
  color: var(--muted);
}

.kpi-tile.error-tile strong {
  color: var(--coral);
}

.btn-export-soft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: #EDE9FE;
  color: #4338CA;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(67, 56, 202, 0.06);
  user-select: none;
  font-family: inherit;
}

.btn-export-soft:hover:not(:disabled) {
  background: #DDD6FE;
  color: #3730A3;
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(67, 56, 202, 0.12);
}

.btn-export-soft:active:not(:disabled) {
  transform: translateY(0);
}

.btn-export-soft:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-export-soft .btn-export-icon {
  color: #4F46E5;
  flex-shrink: 0;
}

/* Recipient Search Group (Visual match for combined select + search input) */
.recipient-search-group {
  display: inline-flex;
  align-items: stretch;
  position: relative;
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, #CBD5E1);
  border-radius: 8px;
  height: 36px;
  min-width: 320px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.recipient-search-group:focus-within {
  border-color: var(--accent, #6366F1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.recipient-search-group .search-lead-icon,
.search-lead-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  width: 15px;
  height: 15px;
}

.recipient-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.recipient-search-input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 34px 0 14px;
  font-size: 12.5px;
  color: var(--ink, #1E293B);
  font-family: inherit;
  border-radius: 8px;
}

.recipient-search-input.has-lead-icon {
  padding-left: 36px !important;
}

.recipient-search-input.has-clear {
  padding-right: 58px;
}

.recipient-search-input::placeholder {
  color: #94A3B8;
}

.recipient-search-icon-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  z-index: 2;
}

.recipient-search-icon-btn:hover {
  background: #F1F5F9;
  color: var(--brand, #4338CA);
}

.recipient-search-icon-btn:active {
  background: #E2E8F0;
  transform: translateY(-50%) scale(0.95);
}

.recipient-search-clear-btn {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transition: all 0.15s ease;
  line-height: 1;
  padding: 0;
  z-index: 2;
}

.recipient-search-clear-btn:hover {
  background: #E2E8F0;
  color: var(--coral-text, #dc2626);
}

/* Floating 1-second Search Enter Hint Tooltip */
.search-input-floating-hint {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: linear-gradient(135deg, #3A1B7B 0%, #271056 100%);
  color: #F8FAFC;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid rgba(196, 181, 253, 0.32);
  box-shadow: 0 6px 18px -2px rgba(39, 16, 86, 0.42), 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 125;
  white-space: nowrap;
  animation: searchHintSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.search-input-floating-hint::before {
  content: '';
  position: absolute;
  top: -4.5px;
  right: 14px;
  width: 8px;
  height: 8px;
  background: #3A1B7B;
  border-top: 1px solid rgba(196, 181, 253, 0.32);
  border-left: 1px solid rgba(196, 181, 253, 0.32);
  transform: rotate(45deg);
}

.search-input-floating-hint:hover {
  background: linear-gradient(135deg, #43248B 0%, #31196B 100%);
  border-color: rgba(196, 181, 253, 0.55);
  box-shadow: 0 8px 22px -2px rgba(39, 16, 86, 0.52), 0 3px 8px rgba(0, 0, 0, 0.18);
}

.search-input-floating-hint:hover::before {
  background: #43248B;
  border-color: rgba(196, 181, 253, 0.55);
}

.search-input-floating-hint .hint-bulb-icon {
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.45));
}

.search-input-floating-hint .hint-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border-radius: 4px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-family: inherit;
  vertical-align: middle;
  margin: 0 1px;
}

.search-input-floating-hint .hint-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  color: #FFFFFF;
  margin: 0 2px;
  vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

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

.status-alert-box {
  padding: 14px 18px;
  border-radius: var(--radius-inner);
  background: var(--coral-soft);
  color: var(--coral-text);
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.invalid-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: var(--surface);
  margin-bottom: 20px;
}

.invalid-data-table {
  width: 100%;
  min-width: 800px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11.5px;
}

.invalid-data-table th {
  text-align: left;
  background: var(--surface-inset);
  color: var(--muted);
  font-weight: 700;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.invalid-data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: middle;
}

.invalid-data-table th:nth-child(1), .invalid-data-table td:nth-child(1) { width: 12%; }
.invalid-data-table th:nth-child(2), .invalid-data-table td:nth-child(2) { width: 12%; }
.invalid-data-table th:nth-child(3), .invalid-data-table td:nth-child(3) { width: 18%; }
.invalid-data-table th:nth-child(4), .invalid-data-table td:nth-child(4) { width: 10%; }
.invalid-data-table th:nth-child(5), .invalid-data-table td:nth-child(5) { width: 12%; }
.invalid-data-table th:nth-child(6), .invalid-data-table td:nth-child(6) { width: 12%; }
.invalid-data-table th:nth-child(7), .invalid-data-table td:nth-child(7) { width: 24%; }

.cell-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-break-word {
  display: block;
  word-break: break-all;
  overflow-wrap: break-word;
}

.cell-nowrap {
  display: block;
  white-space: nowrap;
}

.invalid-cell-highlight {
  background: var(--coral-soft);
  color: var(--coral-text);
  font-weight: 600;
}

.invalid-reason-sub {
  color: var(--coral);
  font-size: 11px;
  line-height: 1.35;
  word-break: break-word;
}

/* Modal Popup Overlay */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(23, 32, 51, 0.18);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease-out;
}

.modal-dialog-card {
  width: min(100%, 640px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-modal);
  padding: 28px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}

.modal-close-btn:hover:not(:disabled) {
  background: var(--surface-inset);
  color: var(--ink);
  border-color: var(--line);
}

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

.modal-dialog-card h2 {
  font: 750 24px 'Bricolage Grotesque', sans-serif;
  margin: 6px 0 8px;
}

.modal-dialog-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.modal-breakdown-cell {
  background: var(--surface-inset);
  padding: 14px;
  border-radius: 10px;
}

.modal-breakdown-cell span {
  font: 600 10px 'IBM Plex Mono', monospace;
  color: var(--muted);
  text-transform: uppercase;
}

.modal-breakdown-cell strong {
  display: block;
  margin-top: 4px;
  font: 700 15px 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
}

/* Success View */
.success-card-box {
  max-width: 580px;
  margin: 36px auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-elevated);
  padding: 42px 32px;
}

.success-glyph-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 18px;
}

.success-card-box h2 {
  font: 750 26px 'Bricolage Grotesque', sans-serif;
  margin: 6px 0 8px;
}

.success-card-box p {
  color: var(--muted);
  font-size: 13.5px;
}

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

[hidden] { display: none !important; }

/* Responsive Rules */
@media (max-width: 960px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .audience-card {
    position: static;
  }
}

@media (max-width: 900px) {
  .review-kpi-grid,
  .review-kpi-grid.has-three-tiles,
  .review-kpi-grid.has-four-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .container { padding: 16px; }
  .topbar { flex-direction: column; gap: 16px; }
  .nav-island { width: 100%; justify-content: space-between; }
  .channel-switcher-wrap, .channel-account-selection { grid-template-columns: 1fr !important; }
  .designer-canvas-layout { grid-template-columns: 1fr; }
  .detail-meta-grid, .review-kpi-grid, .review-kpi-grid.has-three-tiles, .review-kpi-grid.has-four-tiles, .modal-breakdown-grid { grid-template-columns: 1fr !important; }
}

/* Custom styles for GrapesJS editor inside composer */
#grapesjs-editor-container {
  height: 450px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: #FFFFFF;
}

#monaco-editor-container {
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
}

.editor-wrapper {
  transition: all 0.2s ease;
}

.editor-wrapper.hidden {
  display: none !important;
}

.editor-wrapper.show {
  display: block !important;
}

/* Media Gallery styles inside dialog */
.media-upload-area {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line-subtle);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 15px;
  max-height: 350px;
  overflow-y: auto;
  padding: 5px;
}

.media-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  height: 140px;
}

.media-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-subtle);
  transform: translateY(-2px);
}

.media-card__img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  background: #F8FAFD;
}

.media-card__title {
  padding: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  margin-top: auto;
  border-top: 1px solid var(--line-subtle);
}

/* ==========================================================================
   Unauthorized Access Page Styling
   ========================================================================== */
.unauthorized-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  background: var(--bg);
  padding: 24px;
  box-sizing: border-box;
}

.unauthorized-content {
  text-align: center;
  max-width: 400px;
  animation: fadeIn 0.3s var(--ease-spring);
}

.unauthorized-icon {
  font-size: 56px;
  margin-bottom: 16px;
  display: inline-block;
  line-height: 1;
}

.unauthorized-title {
  font: 750 24px 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 8px;
}

.unauthorized-message {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* GrapesJS Workspace Style Cleanups */
.gjs-editor, 
.gjs-editor-wrap {
  background-color: transparent !important;
}

.gjs-pn-views-container, 
.gjs-pn-views, 
.gjs-pn-commands, 
.gjs-pn-options, 
.gjs-pn-panels {
  display: none !important;
}

.gjs-cv-canvas {
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  background-color: #ffffff !important;
}

/* Beautiful Purple Drag Target Indicator */
.gjs-placeholder {
  border: 1px dashed var(--accent) !important;
  background-color: var(--accent-soft) !important;
  height: 6px !important;
  margin: 4px 0;
  border-radius: 4px;
}

/* GrapesJS Block Manager Premium Custom Styling */
#grapesjs-blocks {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: var(--text-color);
    font-family: inherit;
}

.gjs-block-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #ffffff !important;
    background: #ffffff !important;
    padding: 0 !important;
}

.gjs-block-category {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-inner) !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    overflow: hidden !important;
    margin-bottom: 8px !important;
    box-shadow: none !important;
}

.gjs-block-category .gjs-title {
    background: var(--lavender-soft) !important;
    color: var(--accent) !important;
    font-weight: 700;
    font-size: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gjs-block-category .gjs-caret {
    fill: var(--accent) !important;
}

.gjs-blocks-c {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: none !important;
}

.gjs-block-category.gjs-open .gjs-blocks-c {
    display: grid !important;
}

.gjs-block {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    color: var(--accent) !important;
    padding: 10px 12px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: grab !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 48px !important;
    height: auto !important;
}

.gjs-block * {
    color: var(--accent) !important;
}

.gjs-block:hover {
    border-color: var(--accent) !important;
    background: var(--lavender-soft) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.gjs-block:hover * {
    color: var(--accent) !important;
}

.gjs-block-label {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: inherit !important;
}

/* Quill Editor Styling matching Notify Hub */
.ql-toolbar.ql-snow {
    border: 1px solid var(--line) !important;
    border-top-left-radius: var(--radius-inner);
    border-top-right-radius: var(--radius-inner);
    background: var(--surface-raised) !important;
    padding: 8px 12px !important;
}

.ql-container.ql-snow {
    border: 1px solid var(--line) !important;
    border-top: none !important;
    border-bottom-left-radius: var(--radius-inner);
    border-bottom-right-radius: var(--radius-inner);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    background: #ffffff;
    height: 480px;
}

#dynamic-rich-text-editor .ql-toolbar.ql-snow {
    padding: 6px 8px !important;
}

#dynamic-rich-text-editor .ql-container.ql-snow {
    height: 220px !important;
    font-size: 13px;
}

/* Custom Dropdown Styling */
.custom-dropdown-wrap {
  position: relative;
  width: 100%;
}

.custom-dropdown-trigger {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  user-select: none;
}

.custom-dropdown-trigger:focus, .custom-dropdown-trigger.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.custom-dropdown-arrow {
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.custom-dropdown-trigger.active .custom-dropdown-arrow {
  transform: rotate(180deg);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  padding: 6px;
}

.custom-dropdown-item {
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
}

.custom-dropdown-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.custom-dropdown-item.selected {
  background: var(--accent);
  color: #fff;
}

.dropdown-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99;
  background: transparent;
}

/* Hide number input spinners for spacing settings */
.spacing-number-input::-webkit-outer-spin-button,
.spacing-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.spacing-number-input[type=number] {
  -moz-appearance: textfield;
}

/* ==========================================================================
   History Presets & Date Dropdown Calendars
   ========================================================================== */
.preset-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-light);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  outline: none;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preset-chip:hover {
  background: var(--line-soft);
  color: var(--ink);
  border-color: var(--muted);
}

.preset-chip.active {
  background: #eeebfa;
  color: #523ca7;
  border-color: #523ca7;
  font-weight: 600;
}

.calendar-day-hover {
  border-radius: 4px;
  transition: background-color 0.15s, color 0.15s;
}

.calendar-day-hover:hover {
  background-color: var(--line) !important;
  color: var(--ink) !important;
}

/* ==========================================================================
   Bulk Dispatch Jobs View & Status Badges
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-info {
  background-color: #e8f4fd;
  color: #0b7ad0;
}

.badge-warning {
  background-color: #fff9db;
  color: #f08c00;
}

.badge-success {
  background-color: #ebfbee;
  color: #2b8a3e;
}

.badge-danger {
  background-color: #fff5f5;
  color: #c92a2a;
}

.badge-neutral {
  background-color: var(--line);
  color: var(--muted);
}

.badge-cancelled {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.badge-purple {
  background-color: #f3e8ff;
  color: #7e22ce;
}

/* Custom column proportions for the 7-column Bulk Jobs table */
#bulk-jobs-view .history-data-table {
  table-layout: fixed;
  width: 100%;
  min-width: 880px;
}

#bulk-jobs-view .history-data-table th:nth-child(1), #bulk-jobs-view .history-data-table td:nth-child(1) { width: 21%; } /* Konu / Başlık */
#bulk-jobs-view .history-data-table th:nth-child(2), #bulk-jobs-view .history-data-table td:nth-child(2) { width: 8%; }  /* Kanal */
#bulk-jobs-view .history-data-table th:nth-child(3), #bulk-jobs-view .history-data-table td:nth-child(3) { width: 14%; } /* Planlanan Başlangıç */
#bulk-jobs-view .history-data-table th:nth-child(4), #bulk-jobs-view .history-data-table td:nth-child(4) { width: 14%; } /* İlerleme */
#bulk-jobs-view .history-data-table th:nth-child(5), #bulk-jobs-view .history-data-table td:nth-child(5) { width: 24%; text-align: center; } /* Paket Dağılımı */
#bulk-jobs-view .history-data-table th:nth-child(6), #bulk-jobs-view .history-data-table td:nth-child(6) { width: 11%; text-align: center; } /* Durum */
#bulk-jobs-view .history-data-table th:nth-child(7), #bulk-jobs-view .history-data-table td:nth-child(7) { 
  width: 8%; 
  min-width: 92px; 
  text-align: center; 
  padding-right: 20px;
}  /* İşlem */

#bulk-jobs-view .history-data-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-cancel-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: #fef2f2;
  color: #dc2626;
  display: inline-grid;
  place-items: center;
  font-size: 13.5px;
  transition: all 0.15s var(--ease-spring);
  cursor: pointer;
}

.action-cancel-btn:hover {
  border-color: #dc2626;
  background: #fee2e2;
  transform: scale(1.06);
}

.action-delete-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--coral-text);
  font-weight: bold;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  transition: all 0.15s var(--ease-spring);
  cursor: pointer;
}

.action-delete-btn:hover {
  border-color: var(--coral);
  background: var(--coral-soft);
  transform: scale(1.06);
}

/* Enhanced Visual Progress Bar */
.bulk-progress-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.bulk-progress-track {
  flex: 1;
  background: var(--surface-inset, #EEF2F6);
  height: 9px;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.bulk-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.bulk-progress-fill.queuing {
  background: linear-gradient(90deg, #94A3B8, #64748B);
}

.bulk-progress-fill.processing {
  background: linear-gradient(90deg, #6366F1 0%, #8B5CF6 50%, #A855F7 100%);
  background-size: 200% 100%;
  animation: bulkProgressShimmer 2s infinite linear;
  box-shadow: 0 1px 4px rgba(139, 92, 246, 0.35);
}

.bulk-progress-fill.success {
  background: linear-gradient(90deg, #35A477 0%, #10B981 100%);
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.25);
}

.bulk-progress-fill.warning {
  background: linear-gradient(90deg, #F59E0B 0%, #EAB308 100%);
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.25);
}

.bulk-progress-fill.danger {
  background: linear-gradient(90deg, #EF4444 0%, #DC2626 100%);
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.25);
}

.bulk-progress-percent {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@keyframes bulkProgressShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ==========================================================================
   Bulk Jobs Detail View Styles
   ========================================================================== */
.bulk-detail-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-outer);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-subtle);
}

.bulk-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-subtle);
}

.bulk-detail-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bulk-detail-title {
  font: 750 20px 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bulk-detail-meta {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-overview-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface-raised);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-inner);
}

.bulk-kpi-group-title {
  font: 700 11px 'IBM Plex Mono', monospace;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bulk-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.bulk-kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bulk-kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 32, 51, 0.04);
}

.bulk-kpi-card span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bulk-kpi-card strong {
  font: 750 24px 'Bricolage Grotesque', sans-serif;
  color: #0F172A;
}

.bulk-kpi-card.total-card {
  background: #EFF6FF;
  border-color: rgba(59, 130, 246, 0.28);
}
.bulk-kpi-card.total-card span {
  color: #475569;
}
.bulk-kpi-card.total-card strong {
  color: #0F172A; /* Toplam: Siyah */
}

.bulk-kpi-card.success-card {
  background: #F0FDF4;
  border-color: rgba(5, 150, 105, 0.25);
}
.bulk-kpi-card.success-card strong {
  color: #059669; /* Başarılı: Yeşil */
}

.bulk-kpi-card.warning-card {
  background: #FFFBEB;
  border-color: rgba(217, 119, 6, 0.25);
}
.bulk-kpi-card.warning-card strong {
  color: #D97706; /* Bekleyen: Sarı */
}

.bulk-kpi-card.error-card {
  background: #FEF2F2;
  border-color: rgba(220, 38, 38, 0.25);
}
.bulk-kpi-card.error-card strong {
  color: #DC2626; /* Hatalı: Kırmızı */
}

.bulk-kpi-card.info-card strong {
  color: var(--lavender);
}

.bulk-success-banner {
  padding: 20px 24px;
  background: var(--success-soft);
  border: 1px solid var(--success);
  border-radius: var(--radius-inner);
  color: var(--success-text);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bulk-error-summary-banner {
  padding: 14px 18px;
  background: var(--coral-soft);
  border: 1px solid var(--coral);
  border-radius: var(--radius-inner);
  color: var(--coral-text);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.bulk-chunk-accordion {
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bulk-chunk-accordion:hover {
  border-color: var(--coral);
}

.bulk-chunk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface-raised);
  cursor: pointer;
  user-select: none;
  gap: 16px;
  transition: background 0.15s ease;
}

.bulk-chunk-header:hover {
  background: #FFF7F5;
}

.bulk-chunk-body {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bulk-chunk-error-msg {
  padding: 12px 16px;
  background: var(--coral-soft);
  border-left: 4px solid var(--coral);
  border-radius: 4px;
  color: var(--coral-text);
  font-size: 12.5px;
  font-family: 'IBM Plex Mono', monospace;
  word-break: break-word;
  line-height: 1.5;
}

.bulk-recipient-pill-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 12px;
  background: var(--surface-inset);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.bulk-recipient-pill {
  font: 500 11.5px 'IBM Plex Mono', monospace;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 4px;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.kpi-tile.warning-tile {
  border-color: rgba(180, 83, 9, 0.35);
  background: var(--amber-soft);
}

.kpi-tile.warning-tile strong {
  color: var(--amber);
}

.consent-override-label:hover {
  background: #FFFBEB !important;
  border-color: var(--amber) !important;
}

/* ==========================================================================
   Full-Screen Blocking Loading Overlay (Waiting Screen)
   ========================================================================== */
.busy-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.18s ease-out;
  cursor: wait;
  user-select: none;
}

.busy-dialog-card {
  width: min(100%, 460px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-outer);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 36px 32px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  cursor: default;
  animation: popIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.busy-spinner-wrap {
  position: relative;
  width: 62px;
  height: 62px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.busy-spinner-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid var(--surface-inset);
  border-top-color: var(--accent);
  border-right-color: var(--brand);
  animation: spin 0.85s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

.busy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 11px 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
}

.busy-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
  animation: busyPulse 1.4s infinite;
}

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

.busy-title {
  font: 750 20px 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;
}

.busy-message {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.busy-progress-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 2px;
}

.busy-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2px;
}

.busy-progress-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.01em;
}

.busy-progress-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'IBM Plex Mono', monospace;
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 8px;
  border: 1px solid rgba(67, 36, 139, 0.15);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.busy-progress-track {
  width: 100%;
  height: 8px;
  background: var(--surface-inset);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line-subtle);
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.08);
}

.busy-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--lavender) 60%, #7c3aed 100%);
  border-radius: 9999px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(67, 36, 139, 0.35);
}

.busy-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 100%
  );
  animation: barShimmer 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes barShimmer {
  0% { transform: translateX(0); }
  100% { transform: translateX(300%); }
}

.busy-progress-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(90deg, var(--accent), var(--lavender));
  border-radius: 9999px;
  animation: busyIndeterminate 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes busyIndeterminate {
  0% { left: -40%; width: 40%; }
  50% { left: 30%; width: 50%; }
  100% { left: 105%; width: 40%; }
}

.busy-footer-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--surface-inset);
  padding: 6px 12px;
  border-radius: 6px;
  margin-top: 4px;
}

.busy-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}

.busy-close-btn:hover:not(:disabled) {
  background: var(--surface-inset);
  color: var(--ink);
  border-color: var(--line);
}

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

.busy-action-strip {
  width: 100%;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

.btn-cancel-export {
  height: 36px !important;
  min-width: 140px;
  padding: 0 20px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  color: var(--muted) !important;
  border: 1px solid var(--line) !important;
  background: var(--surface) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-cancel-export:hover:not(:disabled) {
  color: var(--coral-text, #E11D48) !important;
  border-color: rgba(225, 29, 72, 0.3) !important;
  background: rgba(225, 29, 72, 0.04) !important;
}

.btn-cancel-export:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

.btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

/* ==========================================================================
   elFinder Media Explorer Custom Styling for Notify Hub
   ========================================================================== */
.elfinder-dialog-icon {
  display: none !important;
}

.elfinder-host {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #ffffff;
}

.modal-dialog-card.elfinder-modal-card {
  width: 1080px;
  max-width: 95vw;
  height: 85vh;
  max-height: 850px;
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  box-sizing: border-box;
}

.elfinder-modal-body {
  flex: 1;
  min-height: 0;
  position: relative;
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.elfinder-modal-body .elfinder {
  border: none !important;
  height: 100% !important;
  width: 100% !important;
  font-family: inherit !important;
}

.elfinder-modal-body .elfinder-workzone {
  min-height: 380px !important;
}

/* Hide file extension badge overlay on top of thumbnails (e.g. "jpeg", "png" badge) */
.elfinder-cwd-icon::before,
.elfinder-cwd-icon:before,
.elfinder-cwd-icon::after,
.elfinder-cwd-icon:after,
.elfinder-cwd-icon .elfinder-cwd-icon-ext {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Ensure clean text styling for filename with extension below thumbnails */
.elfinder-cwd-filename {
  font-size: 11.5px !important;
  font-weight: 500 !important;
  color: var(--ink, #172033) !important;
  word-break: break-word !important;
  line-height: 1.35 !important;
  margin-top: 4px !important;
}

/* ==========================================================================
   User Consents View Styles
   ========================================================================== */
#user-consents-view {
  animation: fadeIn 0.25s var(--ease-spring);
}

.consents-filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.consents-search-deck {
  flex: 1;
  min-width: 260px;
  max-width: 380px;
}

/* Date Filters Area */
.consents-date-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Modern Segmented Control for Quick Presets */
.consents-segmented-presets {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #F1F5F9;
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid #E2E8F0;
}

.segmented-preset-btn {
  border: none;
  background: transparent;
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: #64748B;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.2;
}

.segmented-preset-btn:hover {
  color: #0F172A;
}

.segmented-preset-btn.active {
  background: #FFFFFF;
  color: #43248B;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Custom Date Range Pill Button */
.consents-custom-date-btn {
  height: 32px;
  padding: 0 12px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.consents-custom-date-btn:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: #0F172A;
}

.consents-custom-date-btn.is-active {
  background: #F4F1FB;
  border-color: #5B43A6;
  color: #43248B;
  font-weight: 600;
  box-shadow: 0 0 0 1px #5B43A6;
}

.consents-custom-date-btn .date-icon {
  color: #64748B;
  flex-shrink: 0;
}

.consents-custom-date-btn.is-active .date-icon {
  color: #5B43A6;
}

.consents-custom-date-btn .chevron-icon {
  color: #94A3B8;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.consents-custom-date-btn .chevron-icon.open {
  transform: rotate(180deg);
}

/* Clear all active filters button */
.consents-clear-all-btn {
  height: 30px;
  padding: 0 10px;
  border: none;
  background: rgba(220, 38, 38, 0.08);
  color: #DC2626;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.consents-clear-all-btn:hover {
  background: rgba(220, 38, 38, 0.15);
  color: #B91C1C;
}

/* Subtle Hairline Divider */
.consents-toolbar-divider {
  border: none;
  height: 1px;
  background: #F1F5F9;
  margin: 14px 0 12px 0;
}

/* Action Row (Bottom Deck) */
.consents-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.consents-summary-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #64748B;
}

.consents-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  flex-shrink: 0;
}

.consents-total-counter {
  color: #1E293B;
  font-weight: 500;
}

.consents-total-counter strong {
  font-weight: 700;
  color: #0F172A;
}

.consents-meta-divider {
  color: #CBD5E1;
  font-size: 11px;
}

.consents-meta-hint {
  color: #64748B;
  font-size: 12px;
}

/* Selection Active Badge */
.consents-selection-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  background: #EDE9FE;
  color: #43248B;
  border: 1px solid rgba(67, 36, 139, 0.2);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.consents-selection-active-badge.all-selected {
  background: #F0ECFA;
  border-color: #43248B;
}

.consents-selection-active-badge .badge-icon {
  font-size: 11px;
  font-weight: 800;
}

.btn-clear-selection-mini {
  border: none;
  background: transparent;
  color: #5B43A6;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 0 4px;
  line-height: 1;
  margin-left: 2px;
}

.btn-clear-selection-mini:hover {
  color: #DC2626;
}

.consents-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Premium Export CTA Button */
.btn-consents-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  background: #F4F1FB;
  color: #43248B;
  border: 1px solid rgba(67, 36, 139, 0.22);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(67, 36, 139, 0.05);
  font-family: inherit;
  user-select: none;
}

.btn-consents-export:hover:not(:disabled) {
  background: #ECE5FF;
  border-color: #43248B;
  color: #31196B;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67, 36, 139, 0.12);
}

.btn-consents-export:active:not(:disabled) {
  transform: translateY(0);
}

.btn-consents-export:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-consents-export .btn-export-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5B43A6;
}

/* Page Size Pill */
.consents-pagesize-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 12px;
  color: #64748B;
  transition: border-color 0.15s ease;
}

.consents-pagesize-pill:hover {
  border-color: #94A3B8;
}

.consents-pagesize-pill .pagesize-label {
  font-size: 11.5px;
  color: #64748B;
  white-space: nowrap;
}

.consents-pagesize-pill .pagesize-select-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #1E293B;
  cursor: pointer;
  font-family: inherit;
  padding-right: 4px;
}

/* Prompt Banner */
.all-matching-prompt-banner {
  margin-top: 12px;
  padding: 8px 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(67, 36, 139, 0.15);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-link-select-all {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.btn-link-select-all:hover {
  color: var(--ink);
}

/* Ensure filter card allows calendar dropdown to float above */
#user-consents-view .bezel-card {
  overflow: visible !important;
  position: relative;
  z-index: 50;
}

/* Table Column Widths for User Consents */
#user-consents-view .history-data-table th:nth-child(1),
#user-consents-view .history-data-table td:nth-child(1) { width: 44px; text-align: center; } /* Checkbox */
#user-consents-view .history-data-table th:nth-child(2),
#user-consents-view .history-data-table td:nth-child(2) { width: 15%; } /* Kullanıcı Adı */
#user-consents-view .history-data-table th:nth-child(3),
#user-consents-view .history-data-table td:nth-child(3) { width: 13%; } /* Soyadı */
#user-consents-view .history-data-table th:nth-child(4),
#user-consents-view .history-data-table td:nth-child(4) { width: 15%; } /* Telefon Numarası */
#user-consents-view .history-data-table th:nth-child(5),
#user-consents-view .history-data-table td:nth-child(5) { width: 20%; } /* E-Posta Adresi */
#user-consents-view .history-data-table th:nth-child(6),
#user-consents-view .history-data-table td:nth-child(6) { width: 14%; text-align: center; } /* Kayıt Tarihi */
#user-consents-view .history-data-table th:nth-child(7),
#user-consents-view .history-data-table td:nth-child(7) { width: 11%; text-align: center; } /* SMS İzni */
#user-consents-view .history-data-table th:nth-child(8),
#user-consents-view .history-data-table td:nth-child(8) { width: 11%; text-align: center; } /* E-Posta İzni */

#user-consents-view .history-data-table tr.is-row-selected td {
  background: rgba(67, 36, 139, 0.04);
}

/* Consent Pills */
.consent-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  user-select: none;
  white-space: nowrap;
}

.consent-pill--active {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.consent-pill--active .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16A34A;
}

.consent-pill--inactive {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.22);
}

.consent-pill--inactive .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #DC2626;
}

/* ==========================================================================
   Advanced Bulk Dispatch Settings Card (Review View)
   ========================================================================== */
.advanced-settings-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  box-shadow: var(--shadow-subtle);
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.2s var(--ease-spring);
}

.advanced-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  cursor: pointer;
  background: #FAFBFD;
  user-select: none;
  transition: background 0.15s ease;
}

.advanced-settings-header:hover {
  background: #F1F4F9;
}

.advanced-settings-header.is-open {
  border-bottom: 1px solid var(--line-subtle);
  background: #F4F6FB;
}

.advanced-settings-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.advanced-settings-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.advanced-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.advanced-badge--default {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
}

.advanced-badge--custom {
  background: #EEF2FF;
  color: #4F46E5;
  border: 1px solid #C7D2FE;
}

.advanced-settings-toggle {
  font-size: 12px;
  font-weight: 600;
  color: var(--lavender);
  display: flex;
  align-items: center;
  gap: 4px;
}

.advanced-settings-body {
  padding: 18px 20px;
  background: var(--surface);
}

.advanced-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.4;
}

.advanced-tip--info {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.advanced-tip--warning {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid rgba(180, 83, 9, 0.25);
}

.advanced-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .advanced-grid-2 {
    grid-template-columns: 1fr;
  }
}

.advanced-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.advanced-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.advanced-input {
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
  background: #FFFFFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.advanced-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 36, 139, 0.1);
}

.advanced-input.is-invalid {
  border-color: #EF4444 !important;
  background-color: #FEF2F2 !important;
  color: #B91C1C !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.advanced-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.advanced-divider {
  margin: 16px 0;
  border: none;
  border-top: 1px dashed var(--line);
}

.advanced-wave-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 10px;
}

