/* BSendX Premium Glassmorphic CSS Design System */

:root {
  --bg-primary: #09090b;
  --bg-surface: rgba(20, 20, 25, 0.6);
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-light: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(99, 102, 241, 0.2);
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.2);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.2);
  --info: #06b6d4;
  
  --text-main: #f4f4f5;
  --text-muted: #9ca3af;
  --text-dark: #4b5563;
  
  --font-family: 'Outfit', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 16px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  overflow-x: hidden;
  height: 100vh;
}

/* Background Glowing Ambient Blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}
.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -100px;
  left: -100px;
  animation: float 20s infinite alternate;
}
.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--info);
  bottom: 100px;
  right: -50px;
  animation: float 25s infinite alternate-reverse;
}
.blob-3 {
  width: 300px;
  height: 300px;
  background: var(--warning);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.08;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 50px) scale(1.1); }
}

/* App Containers Layout */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
}

.auth-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--info));
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text-main);
}
.auth-logo i {
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.auth-form h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}
.auth-form .subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.form-group label i {
  margin-right: 6px;
  font-size: 12px;
}
.form-group input, 
.form-group textarea, 
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}
.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.form-row {
  display: flex;
  gap: 16px;
}
.flex-1 { flex: 1; }
.flex-3 { flex: 3; }

.help-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.4;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  background: var(--text-dark);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 12px var(--danger-glow);
}
.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 10px;
}
.btn-block {
  width: 100%;
}

.auth-toggle {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-toggle a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.auth-toggle a:hover { text-decoration: underline; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}
.alert-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-main);
}

/* App Main Container Layout */
.app-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  z-index: 100;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  padding: 0 24px;
  margin-bottom: 40px;
}
.sidebar .brand i {
  color: var(--primary);
  font-size: 20px;
}
.text-gradient {
  background: linear-gradient(90deg, var(--primary), var(--info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
  flex-grow: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
}
.nav-item i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.03));
  border-left: 3px solid var(--primary);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.05);
}

.sidebar-footer {
  padding: 16px 20px 0;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-profile .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 16px;
}
.user-details {
  display: flex;
  flex-direction: column;
}
.user-details .username {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}
.user-details .role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-logout i { font-size: 13px; }
.btn-logout:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
  border-color: var(--danger);
}

/* Main Content Layout */
.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 30px 40px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 20px;
}
.top-bar h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header-widgets {
  display: flex;
  align-items: center;
  gap: 20px;
}

.credit-widget {
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  padding: 8px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
.credit-widget i {
  font-size: 20px;
}
.credit-widget .widget-info {
  display: flex;
  flex-direction: column;
}
.credit-widget .widget-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.credit-widget .widget-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

/* Views display controllers */
.content-view {
  display: none;
  animation: fadeIn 0.4s ease-out;
}
.content-view.active {
  display: block;
}

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

/* Cards system */
.card {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}
.card-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Stats dashboard cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
}
.stat-card .icon-box {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.stat-card .icon-box.purple { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.stat-card .icon-box.green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.stat-card .icon-box.red { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.stat-card .icon-box.blue { background: rgba(6, 182, 212, 0.15); color: var(--info); }

.stat-info h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.stat-info p {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
}

/* Tables style */
.table-card {
  padding: 0;
  overflow: hidden;
}
.card-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-light);
}
.card-header-flex {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th, .data-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.data-table th {
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.01);
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr {
  transition: var(--transition);
}
.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted) !important; }
.text-warning { color: var(--warning) !important; }

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-info { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }

/* Split Views */
.verifier-split, .sender-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

/* Toggle Tabs */
.toggle-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}
.toggle-tabs .tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px;
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-tabs .tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* File Drop Area */
.drag-drop-area {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.drag-drop-area i {
  font-size: 36px;
  color: var(--primary);
  filter: drop-shadow(0 0 4px var(--primary-glow));
}
.drag-drop-area p {
  font-size: 15px;
}
.drag-drop-area span {
  font-size: 12px;
  color: var(--text-muted);
}
.drag-drop-area:hover, .drag-drop-area.drag-over {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}
.drag-drop-area.small {
  padding: 24px 16px;
  gap: 8px;
}
.drag-drop-area.small i { font-size: 26px; }

.file-loaded-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  margin-top: 16px;
}
.file-loaded-info i {
  font-size: 24px;
  color: var(--success);
}
.file-loaded-info .details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.file-loaded-info .file-name {
  font-size: 14px;
  font-weight: 600;
}
.file-loaded-info .file-size, .file-loaded-info .emails-count {
  font-size: 11px;
  color: var(--text-muted);
}

.margin-top-20 { margin-top: 20px; }
.margin-top-30 { margin-top: 30px; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

/* Log Viewer Panel */
.log-card {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
}
.log-viewer {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  overflow-y: auto;
  line-height: 1.5;
  color: #10b981;
}
.log-placeholder {
  color: var(--text-muted);
  text-align: center;
  margin-top: 40px;
  font-family: var(--font-family);
  font-size: 14px;
}
.log-line {
  margin-bottom: 8px;
  word-break: break-all;
}
.log-line.error { color: #f87171; }
.log-line.warning { color: #fbbf24; }
.log-line.system { color: #60a5fa; }
.log-line .timestamp {
  color: var(--text-muted);
  margin-right: 8px;
}

/* Progress bar styles */
.progress-bar-container {
  margin-bottom: 20px;
}
.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--info));
  border-radius: 4px;
  transition: width 0.2s ease;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.verif-stats-counter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.verif-stats-counter .count-card {
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.verif-stats-counter .count-card span {
  font-size: 18px;
  font-weight: 700;
}
.verif-stats-counter .count-card.valid { background: rgba(16, 185, 129, 0.1); color: #34d399; }
.verif-stats-counter .count-card.unknown { background: rgba(245, 158, 11, 0.1); color: #fbbf24; }
.verif-stats-counter .count-card.invalid { background: rgba(239, 68, 68, 0.1); color: #f87171; }

/* Contacts source tabs */
.contacts-source-tabs {
  margin-bottom: 12px;
}

/* Verified list filter pills */
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  font-size: 13px;
  transition: var(--transition);
  user-select: none;
}
.filter-pill:has(input:checked) {
  border-color: var(--accent-blue);
  background: rgba(99,102,241,0.12);
  color: var(--text-primary);
}
.filter-pill input[type="radio"] { display: none; }

/* Reusable form select */
.form-select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.form-select:focus { border-color: var(--accent-blue); }
.form-select option { background: var(--bg-surface); color: var(--text-primary); }

/* Verification history table card */
.verify-history-card {
  margin-top: 1.5rem;
}
.verify-history-card .action-btns {
  display: flex;
  gap: 6px;
}

/* Single verify results details card */
.verify-result-card {
  margin-top: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  animation: fadeIn 0.3s ease-out;
}
.verify-result-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}
.result-details .result-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}
.result-breakdown {
  margin: 16px 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
.result-breakdown .item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}
.result-breakdown .item i.fa-circle-check { color: var(--success); }
.result-breakdown .item i.fa-circle-xmark { color: var(--danger); }
.result-breakdown .item i.fa-circle-minus { color: var(--warning); }
.result-msg {
  font-size: 12px;
  font-style: italic;
  line-height: 1.4;
}

/* Checkbox and ranges in compose */
.smtp-checkbox-pool {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px;
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.smtp-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
}
.smtp-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.range-group {
  display: flex;
  align-items: center;
  gap: 16px;
}
.range-group input[type="range"] {
  flex-grow: 1;
  cursor: pointer;
  accent-color: var(--primary);
}
.range-group span {
  font-size: 14px;
  font-weight: 600;
  width: 80px;
}

.campaign-live-stats {
  margin-bottom: 16px;
}
.stats-counters-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stats-counters-row .stat-box {
  padding: 10px 6px;
  border-radius: 8px;
  font-size: 11px;
  text-align: center;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stats-counters-row .stat-box span {
  font-size: 16px;
  font-weight: 700;
}
.stats-counters-row .stat-box.sent { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.stats-counters-row .stat-box.soft { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.stats-counters-row .stat-box.hard { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.stats-counters-row .stat-box.failed { background: rgba(255, 255, 255, 0.05); color: var(--text-main); }

/* Templates layout */
.template-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}

.template-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 72vh;
  overflow-y: auto;
  padding: 4px 2px;
}

.template-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--transition);
  cursor: default;
}
.template-card:hover {
  border-color: var(--accent-blue);
  background: rgba(99,102,241,0.06);
}
.template-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.template-card-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}
.template-card-subject {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.template-card-date {
  font-size: 11px;
  color: var(--text-muted);
}
.template-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Template picker in modal */
.template-picker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
}
.template-picker-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.template-picker-item:hover {
  border-color: var(--accent-blue);
  background: rgba(99,102,241,0.08);
}
.template-picker-item-info { flex: 1; min-width: 0; }
.template-picker-item-name { font-weight: 600; font-size: 14px; }
.template-picker-item-subject { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}
.btn-ghost:hover { border-color: var(--accent-blue); color: var(--text-primary); }

/* SMTP setup layout */
.smtp-layout, .suppression-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}
.smtp-list-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}
.smtp-profile-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}
.smtp-profile-card:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.04);
}
.smtp-profile-card .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.smtp-profile-card h3 {
  font-size: 15px;
  font-weight: 600;
}
.smtp-profile-card p {
  font-size: 12px;
  color: var(--text-muted);
}
.smtp-profile-card .actions {
  display: flex;
  gap: 8px;
}

.smtp-action-buttons {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}
.smtp-action-buttons button {
  flex: 1;
}

/* Guide records card */
.guide-card .guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 20px;
}
.guide-step {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  position: relative;
}
.guide-step .step-num {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 20px;
  font-weight: 800;
  color: rgba(99, 102, 241, 0.2);
}
.guide-step h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.guide-step p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.guide-step code {
  display: block;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-family: monospace;
  font-size: 11px;
  word-break: break-all;
  border: 1px solid var(--border-light);
}

/* Modal and Report styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 1;
  transition: var(--transition);
}
.modal.hidden {
  display: none !important;
}
.modal-content {
  width: 90%;
  max-width: 750px;
  background: var(--bg-surface);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: modalSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-content.max-width-400 {
  max-width: 400px;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}
.modal-header h2 {
  font-size: 22px;
  font-weight: 700;
}
.close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  /* Explicit minimum size so the button stays clickable even if the icon
     font fails to load (it would otherwise collapse to 0x0, since an
     icon-only button has no text to give it intrinsic dimensions). */
  min-width: 32px;
  min-height: 32px;
  padding: 4px;
}
.close-modal:hover {
  color: var(--text-main);
}

/* Reports layout metrics & legend */
.report-stats {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.02);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
}
.chart-container {
  position: relative;
  width: 120px;
  height: 120px;
}
.donut-chart {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.donut-chart circle {
  fill: none;
  stroke-width: 8;
}
.donut-chart .chart-bg {
  stroke: rgba(255, 255, 255, 0.05);
}
.donut-chart .chart-fill {
  transition: stroke-dasharray 0.5s ease-out;
}
.donut-chart .chart-fill.sent { stroke: var(--primary); }
.donut-chart .chart-fill.bounces { stroke: var(--danger); }
.donut-chart .chart-fill.unsubscribed { stroke: var(--warning); }

.chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.chart-center .value {
  font-size: 20px;
  font-weight: 700;
}
.chart-center .label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.report-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  flex-grow: 1;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.legend-item strong {
  color: var(--text-main);
}
.bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.bullet.sent { background: var(--primary); }
.bullet.hard-bounce { background: var(--danger); }
.bullet.soft-bounce { background: var(--warning); }
.bullet.unsub { background: var(--info); }
.bullet.failed { background: var(--text-dark); }

.report-details-tabs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.report-details-tabs .tab-header {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}
.report-details-tabs .tab-header .tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 4px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.report-details-tabs .tab-header .tab-btn.active {
  color: var(--primary);
  border-color: var(--primary);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }
.small-table {
  max-height: 200px;
  overflow-y: auto;
}
.small-table .data-table th, .small-table .data-table td {
  padding: 10px 16px;
  font-size: 12px;
}

/* User management specific controls */
.admin-action-btn {
  padding: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}
.admin-action-btn:hover {
  color: var(--primary);
}
.admin-action-btn.delete:hover {
  color: var(--danger);
}

/* Hidden Utility */
.hidden {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .app-container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none; /* In a full responsive layout, we would implement a hamburger drawer */
  }
  .verifier-split, .sender-split, .smtp-layout, .suppression-layout, .template-layout {
    grid-template-columns: 1fr;
  }
}
