/* ==========================================================================
   CSS CUSTOM VARIABLES & RESET
   ========================================================================== */
:root {
  /* Color Palette (HSL Tailored) */
  --bg-app: hsl(224, 40%, 6%);
  --bg-sidebar: hsl(224, 35%, 10%);
  --bg-card: hsl(224, 30%, 14%);
  --bg-input: hsl(224, 25%, 18%);
  --bg-hover: hsl(224, 25%, 22%);
  
  --border-glass: hsla(224, 100%, 100%, 0.07);
  --border-focus: hsl(210, 100%, 55%);
  
  --text-primary: hsl(210, 38%, 95%);
  --text-secondary: hsl(217, 16%, 68%);
  --text-muted: hsl(217, 12%, 48%);
  
  /* Accent Colors */
  --accent-blue: hsl(210, 100%, 56%);
  --accent-blue-rgb: 0, 122, 255;
  --accent-green: hsl(145, 80%, 50%);
  --accent-green-rgb: 46, 204, 113;
  --accent-red: hsl(354, 85%, 58%);
  --accent-red-rgb: 231, 76, 60;
  --accent-orange: hsl(36, 100%, 50%);
  --accent-orange-rgb: 243, 156, 18;
  
  /* Shadows & Radius */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-blue: 0 0 15px hsla(210, 100%, 56%, 0.25);
  --shadow-glow-green: 0 0 15px hsla(145, 80%, 50%, 0.25);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Font Stack */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, monospace;
}

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

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ==========================================================================
   APP GRID LAYOUT
   ========================================================================== */
.app-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  width: 100vw;
}

/* ==========================================================================
   SIDEBAR STYLES
   ========================================================================== */
.sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-glass);
}

.logo-icon {
  font-size: 24px;
}

.sidebar-brand h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 30%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--accent-blue);
  color: #fff;
  box-shadow: var(--shadow-glow-blue);
}

.nav-icon {
  font-size: 18px;
}

.sidebar-footer {
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

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

.pulse-dot.green {
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s infinite;
}

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

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh;
}

.main-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(6, 11, 19, 0.2);
  backdrop-filter: blur(10px);
}

.header-title h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.header-title p {
  font-size: 14px;
  margin-top: 4px;
}

/* ==========================================================================
   VIEW SECTIONS
   ========================================================================== */
.view-section {
  display: none;
  flex-direction: column;
  padding: 32px;
  overflow-y: auto;
  flex-grow: 1;
  gap: 24px;
}

.view-section.active {
  display: flex;
}

/* ==========================================================================
   CAMPAIGN FILTER BAR (DASHBOARD SELECTOR)
   ========================================================================== */
.filter-bar {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 20px;
}

.filter-bar-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.select-field {
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  outline: none;
  font-family: var(--font-sans);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  min-width: 250px;
}

.select-field:focus {
  border-color: var(--border-focus);
}

/* ==========================================================================
   STAT CARDS
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
}

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

.stat-title {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.bg-blue { background-color: rgba(0, 122, 255, 0.15); color: var(--accent-blue); }
.bg-red { background-color: rgba(231, 76, 60, 0.15); color: var(--accent-red); }
.bg-green { background-color: rgba(46, 204, 113, 0.15); color: var(--accent-green); }
.bg-orange { background-color: rgba(243, 156, 18, 0.15); color: var(--accent-orange); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-family: var(--font-sans);
}

.stat-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 24px;
  flex-grow: 1;
  min-height: 400px;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .app-container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

/* ==========================================================================
   CAMPAIGN CARD DETAILS & PROGRESS BAR
   ========================================================================== */
.campaign-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#campaign-badge {
  background-color: var(--bg-input);
  color: var(--text-secondary);
}

#campaign-badge.en_progreso {
  background-color: rgba(46, 204, 113, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(46, 204, 113, 0.2);
}

#campaign-badge.en_cola {
  background-color: rgba(243, 156, 18, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(243, 156, 18, 0.2);
}

#campaign-badge.finalizada {
  background-color: rgba(0, 122, 255, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(0, 122, 255, 0.2);
}

.campaign-type {
  font-size: 12px;
  background-color: var(--bg-hover);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.campaign-subject-wrap {
  background-color: rgba(0, 0, 0, 0.15);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  border: 1px solid var(--border-glass);
}

.subject-text {
  font-weight: 500;
  margin-left: 6px;
}

.progress-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
}

.progress-bar-bg {
  height: 12px;
  background-color: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-glass);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-green) 100%);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-glow-green);
}

.progress-details {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.estimation-box {
  background-color: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  padding: 16px;
}

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

.estimation-icon {
  font-size: 28px;
}

.estimation-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-blue);
  font-family: var(--font-mono);
  margin: 2px 0;
}

/* COUNTDOWN TICKER */
.countdown-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(0, 122, 255, 0.08);
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  animation: pulseGlow 2s infinite ease-in-out;
}

.countdown-icon {
  font-size: 14px;
}

.countdown-timer-val {
  font-size: 16px;
  font-weight: bold;
  color: var(--accent-blue);
  margin-left: auto;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 5px rgba(0,122,255,0.06); }
  50% { box-shadow: 0 0 15px rgba(0,122,255,0.2); }
  100% { box-shadow: 0 0 5px rgba(0,122,255,0.06); }
}

/* SMART ALERTS */
.alert-box {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

.alert-warning {
  background-color: rgba(243, 156, 18, 0.08);
  border: 1px solid rgba(243, 156, 18, 0.25);
  color: hsl(38, 95%, 70%);
}

.alert-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   QUEUE RUNNER TABLE VISUALS
   ========================================================================== */
.scrollable-y {
  overflow-y: auto;
  flex-grow: 1;
}

.max-h-64 {
  max-height: 256px;
}

.table-container {
  width: 100%;
}

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

.queue-table th, .contacts-table th {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
  background-color: rgba(0,0,0,0.1);
}

.queue-table td, .contacts-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.queue-table tbody tr:hover, .contacts-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Table Badges */
.q-badge {
  font-size: 11px;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.q-badge.pendiente {
  background-color: rgba(243, 156, 18, 0.15);
  color: var(--accent-orange);
}

.q-badge.enviado {
  background-color: rgba(46, 204, 113, 0.15);
  color: var(--accent-green);
}

.q-badge.fallido {
  background-color: rgba(231, 76, 60, 0.15);
  color: var(--accent-red);
}

.queue-spinner {
  display: none;
  align-items: center;
  gap: 8px;
}

.queue-spinner.active {
  display: flex;
}

.spinner-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-blue);
  border-radius: 50%;
  animation: spinner-ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ==========================================================================
   FORM CONTROLS
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-col {
  display: flex;
  flex-direction: column;
}

.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-grow { flex-grow: 1; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.font-medium { font-weight: 500; }

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

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea {
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all 0.2s ease;
  width: 100%;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

input:disabled, textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.help-text {
  font-size: 11.5px;
  color: var(--text-muted);
}

.tag {
  background-color: var(--bg-input);
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  color: var(--accent-blue);
  font-size: 11px;
}

/* Range Input Stylings */
.range-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: rgba(0,0,0,0.1);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

input[type="range"]::-webkit-slider-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
  box-shadow: 0 0 10px rgba(0,122,255,0.4);
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.range-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.range-value-display {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-blue);
}

/* Toggle Switch */
.toggle-switch-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-input);
  transition: .3s;
  border: 1px solid var(--border-glass);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}

input:checked + .slider {
  background-color: var(--accent-blue);
  box-shadow: var(--shadow-glow-blue);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--accent-blue);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.toggle-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Simulated Banner Informational */
.banner-info {
  display: flex;
  gap: 12px;
  padding: 14px;
  background-color: rgba(0, 122, 255, 0.06);
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.4;
}

.banner-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* SMTP checkboxes inside campaign creator */
.smtp-checkbox-list {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px;
  max-height: 160px;
  overflow-y: auto;
}

.smtp-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease;
}

.smtp-check-item:hover {
  background-color: var(--bg-hover);
}

.smtp-check-details {
  display: flex;
  flex-direction: column;
}

.smtp-check-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.smtp-check-limit {
  font-size: 11px;
  color: var(--text-muted);
}

/* Custom Checkbox */
.checkbox-container {
  display: block;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 18px;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: var(--bg-hover);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-blue);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Test acceleration box styling */
.test-acceleration-box {
  background-color: rgba(243, 156, 18, 0.03);
  border: 1px solid rgba(243, 156, 18, 0.12);
  padding: 14px;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   QUILL TEXT EDITOR snow customizations
   ========================================================================== */
.editor-outer-wrap {
  display: flex;
  flex-direction: column;
}

.ql-toolbar.ql-snow {
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass) !important;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.ql-toolbar.ql-snow .ql-stroke {
  stroke: var(--text-secondary);
}

.ql-toolbar.ql-snow .ql-fill {
  fill: var(--text-secondary);
}

.ql-toolbar.ql-snow .ql-picker {
  color: var(--text-secondary);
}

.ql-container.ql-snow {
  border: 1px solid var(--border-glass) !important;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  overflow: hidden;
}

.ql-editor {
  background-color: #ffffff;
  color: #2d3748;
  font-family: Arial, sans-serif;
  min-height: 250px;
  max-height: 450px;
  overflow-y: auto;
  font-size: 14.5px;
  line-height: 1.5;
}

.ql-editor.ql-blank::before {
  color: #a0aec0 !important;
  left: 15px;
  font-style: normal;
}

/* ==========================================================================
   SMTP ACCOUNT CRUD CARD LIST
   ========================================================================== */
.smtp-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.smtp-acc-card {
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.smtp-acc-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: var(--bg-hover);
}

.smtp-acc-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.smtp-acc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.smtp-acc-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.smtp-acc-badge {
  font-size: 10px;
  background-color: rgba(0, 122, 255, 0.15);
  color: var(--accent-blue);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-top: 2px;
  font-weight: 500;
}

.btn-danger-icon {
  background-color: rgba(231, 76, 60, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(231, 76, 60, 0.25);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger-icon:hover {
  background-color: var(--accent-red);
  color: #fff;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
}

/* ==========================================================================
   DRAG AND DROP FILE IMPORT ZONE
   ========================================================================== */
.drag-drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.drag-drop-zone:hover, .drag-drop-zone.dragover {
  border-color: var(--accent-blue);
  background-color: rgba(0, 122, 255, 0.05);
  box-shadow: 0 0 15px rgba(0, 122, 255, 0.08);
}

.upload-icon {
  font-size: 36px;
}

.import-report-box {
  border: 1px solid var(--border-glass);
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 8px;
  animation: fadeIn 0.3s ease;
}

.import-report-box h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}

.report-stat-item {
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.report-stat-item strong {
  font-size: 18px;
  font-family: var(--font-mono);
}

.text-green { color: var(--accent-green); }
.text-orange { color: var(--accent-orange); }
.text-red { color: var(--accent-red); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-family: var(--font-sans);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-blue);
  color: #fff;
}

.btn-primary:hover {
  background-color: hsl(210, 100%, 50%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-blue);
}

.btn-secondary {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background-color: hsl(224, 25%, 26%);
  border-color: rgba(255,255,255,0.15);
}

.btn-secondary-outline {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

.btn-secondary-outline:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger-outline {
  background-color: transparent;
  color: var(--accent-red);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.btn-danger-outline:hover {
  background-color: rgba(231, 76, 60, 0.1);
  border-color: var(--accent-red);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn-xs {
  padding: 6px 12px;
  font-size: 11.5px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   CONTACTS VIEW LAYOUTS
   ========================================================================== */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .contacts-grid {
    grid-template-columns: 1fr;
  }
}

.card-divider {
  border: 0;
  height: 1px;
  background-color: var(--border-glass);
  margin: 20px 0;
}

.mb-4 { margin-bottom: 16px; }

.list-container {
  max-height: 400px;
}

/* ==========================================================================
   IMAGE RESIZER FLOATING BUBBLE
   ========================================================================== */
.image-resizer-bubble {
  position: absolute;
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  z-index: 2000;
  width: 260px;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  animation: fadeIn 0.2s ease;
}

.image-resizer-bubble.hidden {
  display: none !important;
}

.resizer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 8px;
}

.resizer-header .close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}

.resizer-header .close-btn:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   TOAST NOTIFICATION DESIGNS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-lg);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 250px;
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-red); }
.toast.info { border-left: 4px solid var(--accent-blue); }

/* ==========================================================================
   ANIMATIONS & SCROLLBARS
   ========================================================================== */
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

@keyframes spinner-ping {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-app);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-input);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bg-hover);
}
.pb-2 { padding-bottom: 8px; }
.pb-8 { padding-bottom: 32px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.text-center { text-align: center; }
.font-mono { font-family: var(--font-mono); }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.font-medium { font-weight: 500; }
.mt-2 { margin-top: 8px; }
.border-t-glass { border-top: 1px solid var(--border-glass); }
.pt-4 { padding-top: 16px; }

/* ==========================================================================
   MODAL PREVIEW STYLES
   ========================================================================== */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 700px;
  padding: 24px;
  box-shadow: var(--shadow-xl);
  animation: fadeIn 0.3s ease;
}

.modal-body img {
  max-width: 100% !important;
  height: auto !important;
}
