:root {
  color-scheme: dark;
  --bg: #05060a;
  --card: #0c0f18;
  --surface: #101422;
  --accent: #7c5dff;
  --accent-soft: rgba(124, 93, 255, 0.12);
  --accent-strong: rgba(124, 93, 255, 0.32);
  --success: #49d6a3;
  --warning: #ffb347;
  --danger: #ff6b81;
  --text: #f5f7ff;
  --muted: #a0a6c3;
  --border: rgba(255, 255, 255, 0.08);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(124, 93, 255, 0.25), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  background: rgba(7, 9, 15, 0.9);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
}

.logo-block {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 40px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c5dff, #a877ff);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.logo-title {
  font-weight: 600;
  margin: 0;
}

.logo-subtitle {
  color: var(--muted);
  margin: 2px 0 0;
  font-size: 0.85rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 10px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--accent-soft);
}

.sidebar-foot {
  margin-top: auto;
}

.ghost-button,
.primary-button {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  width: 100%;
}

.primary-button {
  background: linear-gradient(135deg, #7c5dff, #5ac8fa);
  color: #fff;
  box-shadow: 0 10px 30px rgba(124, 93, 255, 0.35);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.main-area {
  padding: 32px 48px 48px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  overflow-x: hidden;
  max-width: 100%;
}

.top-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  text-align: center;
  margin-bottom: 8px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
  text-align: center;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}

.top-bar-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.dashboard-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  color: var(--heading);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.overview-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.overview-controls .status-chip {
  min-width: 140px;
  text-align: center;
}

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

.primary-button.small {
  padding: 10px 18px;
  font-size: 0.9rem;
}

.clear-button.subtle {
  border-color: rgba(15, 115, 74, 0.25);
  background: rgba(15, 115, 74, 0.08);
  color: var(--primary-strong);
}

.clear-button.subtle:hover {
  border-color: rgba(15, 115, 74, 0.5);
  background: rgba(15, 115, 74, 0.12);
}

.select-wrapper {
  position: relative;
  display: inline-flex;
}

.select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.85rem;
  color: var(--muted);
}

.overview-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

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

.primary-button.small {
  padding: 10px 18px;
  font-size: 0.9rem;
}

.clear-button.subtle {
  border-color: rgba(15, 115, 74, 0.2);
  background: rgba(15, 115, 74, 0.08);
  color: var(--primary-strong);
}

.clear-button.subtle:hover {
  border-color: rgba(15, 115, 74, 0.4);
  background: rgba(15, 115, 74, 0.12);
}

.status-chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.insights-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.radial-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.radial-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.25), transparent 60%);
  border-radius: 24px;
}

.radial-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

.radial-label {
  position: absolute;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.radial-label .radial-value {
  font-size: 2.2rem;
  font-weight: 600;
  color: #0f172a;
}

.radial-label .radial-caption {
  color: var(--muted);
  font-size: 0.9rem;
}

.radial-period {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.radial-trend-block {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.35);
  padding: 12px 14px;
  border-radius: 14px;
}

.radial-trend {
  margin: 0;
  font-weight: 600;
}

.radial-trend[data-intent='up'] {
  color: #047857;
}

.radial-trend[data-intent='down'] {
  color: #b91c1c;
}

.radial-subtext {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-card {
  min-height: unset;
  padding: 24px;
  overflow: visible;
}

.progress-card canvas {
  width: 100% !important;
  height: 320px !important;
  margin: 30px auto 20px auto;
}

.progress-chart-wrapper {
  position: relative;
  margin-top: 8px;
}

.progress-tooltip {
  position: absolute;
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  border: 1px solid var(--border);
  border: 1px solid #e2e8f0;
  font-size: 0.9rem;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity 0.15s ease;
  min-width: 140px;
}

.progress-tooltip.visible {
  opacity: 1;
}

.progress-tooltip .tooltip-title {
  font-weight: 600;
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: #0f172a;
}

.progress-tooltip .tooltip-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-tooltip .tooltip-breakdown p {
  margin: 0;
  font-size: 0.85rem;
  color: #5c6f68;
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

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

.card-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-value {
  font-size: 2rem;
  font-weight: 600;
  margin: 10px 0 4px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.trend {
  color: var(--success);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.trend.negative {
  color: var(--danger);
}

.charts-grid,
.smtp-grid {
  display: grid;
  gap: 18px;
}

.charts-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.chart-card {
  min-height: 280px;
}

.chart-card canvas {
  width: 100%;
  height: 240px !important;
}

.chart-metrics {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.chart-metrics.compact {
  margin-top: 8px;
}

.chart-metrics > div {
  flex: 1;
}

.metric-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

.metric-value {
  margin: 2px 0 0;
  font-size: 1.4rem;
  font-weight: 600;
}


.smtp-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.smtp-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #ecfdf5;
  border: 1px solid #42ad82;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1d8d65;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #42ad82;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.panel-section {
  display: none;
  flex-direction: column;
  gap: 24px;
}

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

.monitor-live-section {
  min-height: calc(100vh - 120px);
}

.monitor-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.monitor-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f5f8f7 100%);
  border: 1px solid #e1e8e3;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(23, 46, 37, 0.04);
}

.monitor-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 173, 130, 0.12);
  border-color: #42ad82;
}

.monitor-stat-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.monitor-stat-label {
  font-size: 0.85rem;
  color: #5c6f68;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.monitor-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #42ad82;
  line-height: 1;
}

.live-stream-card {
  background: #ffffff;
  border: 1px solid #e1e8e3;
  overflow: hidden;
  max-width: 100%;
}

.live-stream-header {
  padding: 20px;
  border-bottom: 2px solid #eef7f1;
  background: linear-gradient(135deg, #f5f8f7 0%, #ffffff 100%);
}

.stream-stats {
  display: flex;
  gap: 32px;
  align-items: center;
}

.stream-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stream-stat-label {
  font-size: 0.85rem;
  color: #5c6f68;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stream-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #42ad82;
}

.live-stream-container {
  max-height: 600px;
  overflow-x: auto;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 8px;
  position: relative;
}

.live-stream-container::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.live-stream-container:hover::after {
  opacity: 1;
}

.live-stream-container::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.live-stream-container::-webkit-scrollbar-track {
  background: #f5f8f7;
  border-radius: 4px;
}

.live-stream-container::-webkit-scrollbar-thumb {
  background: #c7d9d0;
  border-radius: 4px;
}

.live-stream-container::-webkit-scrollbar-thumb:hover {
  background: #a8c4b5;
}

.live-stream-table {
  width: 100%;
  min-width: 1200px;
  border-collapse: collapse;
  table-layout: fixed;
}

.live-stream-table thead {
  position: sticky;
  top: 0;
  background: #f5f8f7;
  z-index: 10;
}

.live-stream-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f1f1c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e1e8e3;
}

.live-stream-table th:nth-child(1) { width: 8%; }  /* TIME */
.live-stream-table th:nth-child(2) { width: 12%; } /* CAMPAIGN */
.live-stream-table th:nth-child(3) { width: 25%; } /* RECIPIENT EMAIL */
.live-stream-table th:nth-child(4) { width: 12%; } /* STATUS */
.live-stream-table th:nth-child(5) { width: 25%; } /* SMTP SERVER */
.live-stream-table th:nth-child(6) { width: 9%; }  /* OPENS */
.live-stream-table th:nth-child(7) { width: 9%; }  /* CLICKS */

.live-stream-table tbody tr {
  border-bottom: 1px solid #eef7f1;
  transition: background 0.15s ease;
}

.live-stream-table tbody tr:hover {
  background: #f5f8f7;
}

.live-stream-table tbody tr.empty-state {
  text-align: center;
  color: #5c6f68;
  font-style: italic;
}

.live-stream-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: #0f1f1c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-time {
  color: #5c6f68;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  white-space: nowrap;
}

.stream-campaign {
  font-weight: 600;
  color: #42ad82;
}

.stream-email {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #0f1f1c;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.status-success {
  background: #ecfdf5;
  color: #1d8d65;
  border: 1px solid #42ad82;
}

.status-badge.status-error {
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #fc8181;
}

.stream-smtp {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #5c6f68;
}

.stream-opens,
.stream-clicks {
  text-align: center;
  font-weight: 600;
  color: #42ad82;
}

.stream-row.status-success {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.campaign-detail-card {
  margin-bottom: 24px;
  background: #ffffff;
  border: 1px solid #e1e8e3;
  box-shadow: 0 2px 8px rgba(23, 46, 37, 0.06);
}

.campaign-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 2px solid #eef7f1;
  margin-bottom: 20px;
}

.campaign-detail-header h3 {
  color: #0f1f1c;
  margin: 0;
}

.campaign-subtitle {
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #5c6f68;
}

.campaign-progress-block {
  text-align: right;
  min-width: 180px;
}

.campaign-progress-label {
  margin: 0;
  font-size: 0.85rem;
  color: #5c6f68;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.campaign-progress-value {
  margin: 4px 0 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #42ad82;
}

.campaign-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.campaign-stat-card {
  background: #f5f8f7;
  border: 1px solid #e1e8e3;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.campaign-stat-card:hover {
  background: #eef7f1;
  border-color: #42ad82;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 173, 130, 0.15);
}

.stat-label {
  margin: 0;
  font-size: 0.85rem;
  color: #5c6f68;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  margin: 8px 0 4px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f1f1c;
}

.stat-caption {
  margin: 0;
  font-size: 0.85rem;
  color: #42ad82;
  font-weight: 500;
}

.campaign-delivery-breakdown {
  background: linear-gradient(135deg, #eef7f1 0%, #f5f8f7 100%);
  border: 1px solid #e1e8e3;
  border-radius: 12px;
  padding: 20px;
}

.campaign-delivery-breakdown h4 {
  color: #0f1f1c;
}

.delivery-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.delivery-stat {
  text-align: left;
  background: #ffffff;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #e1e8e3;
}

.delivery-stat p {
  color: #0f1f1c;
}

@media (max-width: 768px) {
  .campaign-detail-header {
    flex-direction: column;
    gap: 20px;
  }
  
  .campaign-progress-block {
    text-align: left;
    width: 100%;
  }
  
  .campaign-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .delivery-breakdown-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.5s ease;
  background: linear-gradient(135deg, #49d6a3, #5ac8fa);
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
}

th {
  color: var(--muted);
  font-weight: 500;
}

.select-input {
  appearance: none;
  -webkit-appearance: none;
  background: #f2fbf6;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--heading);
  padding: 10px 40px 10px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  min-width: 140px;
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.85);
  backdrop-filter: blur(20px);
  display: grid;
  place-items: center;
  z-index: 9999;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  width: min(420px, 90vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-field input {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}

.help-text {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.08);
}

.badge.success {
  color: var(--success);
  background: rgba(73, 214, 163, 0.16);
}

.badge.warning {
  color: var(--warning);
  background: rgba(255, 179, 71, 0.16);
}

.badge.danger {
  color: var(--danger);
  background: rgba(255, 107, 129, 0.16);
}

.muted {
  color: var(--muted);
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .top-bar,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-area {
    padding: 24px;
  }
  .sidebar {
    flex-direction: column;
    align-items: flex-start;
  }
}
:root {
  color-scheme: light;
  --bg: #f5f8f7;
  --panel: #ffffff;
  --panel-soft: #eef7f1;
  --border: #e1e8e3;
  --text: #0f1f1c;
  --muted: #5c6f68;
  --primary: #42ad82;
  --primary-strong: #1d8d65;
  --danger: #ff6b6b;
  --shadow: 0 20px 40px rgba(23, 46, 37, 0.08);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.logo-title {
  font-weight: 600;
  margin: 0;
}

.logo-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 500;
}

.nav-link.active,
.nav-link:hover {
  color: var(--text);
  background: var(--panel-soft);
}

.sidebar-foot {
  margin-top: auto;
}

.sidebar-foot .clear-button {
  width: 100%;
  justify-content: center;
}

.ghost-button {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  padding: 12px 16px;
  font-weight: 500;
  cursor: pointer;
}

.main-area {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.top-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
}

.top-bar h1 {
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 12px;
  color: var(--primary-strong);
  margin: 0;
}

.top-bar-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.primary-button {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #fff;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.clear-button {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  padding: 8px 14px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-button:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

.clear-button:active {
  transform: translateY(0);
}

.clear-button svg {
  flex-shrink: 0;
}

.status-chip {
  background: var(--panel-soft);
  color: var(--primary-strong);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.panel-card {
  background: var(--panel);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid #ebf1ed;
  box-shadow: 0 12px 30px rgba(13, 35, 29, 0.05);
}

.card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.card-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.stat-value {
  font-size: 36px;
  font-weight: 600;
  margin: 8px 0;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.stat-trend {
  font-size: 14px;
  font-weight: 600;
}

.trend-up {
  color: var(--primary-strong);
}

.trend-down {
  color: var(--danger);
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.chart-card canvas {
  width: 100%;
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card th,
.table-card td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.table-card th {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 12px;
  color: var(--muted);
}

.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.smtp-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.smtp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.smtp-card {
  border-left: 6px solid var(--primary);
  position: relative;
}

.smtp-card.smtp-banned {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.smtp-from {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 4px 0 0;
}

.smtp-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.smtp-stats-row:last-child {
  border-bottom: none;
}

.smtp-stat-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.smtp-stat-value {
  font-weight: 600;
  color: var(--primary-strong);
}

.smtp-ban-reason {
  color: #ef4444;
  font-size: 0.9rem;
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  margin: 8px 0;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-active {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.status-good {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.status-bad {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.status-idle {
  background: rgba(156, 163, 175, 0.1);
  color: #6b7280;
}

.status-unverified {
  background: rgba(251, 191, 36, 0.1);
  color: #f59e0b;
}

.status-banned {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.status-disabled {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.smtp-card h4 {
  margin: 0;
}

.smtp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
}

.smtp-health {
  font-weight: 600;
  color: var(--primary-strong);
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.85);
  backdrop-filter: blur(20px);
  display: grid;
  place-items: center;
  z-index: 9999;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-card {
  width: min(420px, 90vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
}

.form-field input,
.select-input {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
}

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

.hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .sidebar-foot {
    width: 100%;
  }

  .main-area {
    padding: 32px;
  }
}

@media (max-width: 720px) {
  .top-bar {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .main-area {
    padding: 24px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}

