/* ===== Premium Glassmorphism Theme (Apple-inspired) ===== */
:root {
  /* Colors - Lightened Base */
  --bg-dark: #141414;
  /* Was #000000 */
  --bg-deep: #1c1c1e;
  /* Was #0a0a0a */

  --accent-1: #5e5ce6;
  /* Indigo */
  --accent-2: #32d74b;
  /* Green */
  --accent-3: #bf5af2;
  /* Purple */
  --accent-4: #0a84ff;
  /* Blue */

  --text-main: #f5f5f7;
  --text-sec: #98989d;
  /* Slightly lighter for readability */
  --text-muted: #86868b;

  /* Glass Vars - Improved Visibility */
  --glass-bg: rgba(40, 40, 40, 0.65);
  /* More opaque for better contrast */
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);

  --radius: 24px;
  --btn-radius: 9999px;

  /* Layout */
  --page-width: 1400px;
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* ===== Dynamic Background Orbs (The "Bubbles") ===== */
/* Added hardware acceleration hints (transform: translate3d) to fix flickering on scroll */
.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.fx-1 {
  background: radial-gradient(circle at 15% 20%, rgba(94, 92, 230, 0.2), transparent 50%);
  filter: blur(80px);
  animation: float 20s ease-in-out infinite;
}

.fx-2 {
  background: radial-gradient(circle at 85% 60%, rgba(10, 132, 255, 0.12), transparent 50%);
  filter: blur(100px);
  animation: float 25s ease-in-out infinite reverse;
}

/* Bubbles container */
.img-bubbles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  filter: blur(90px);
  opacity: 0.5;
  /* Slightly reduced opacity for clearer foreground */
  background:
    radial-gradient(circle at 50% 10%, rgba(191, 90, 242, 0.15), transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(50, 215, 75, 0.08), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(255, 55, 95, 0.12), transparent 50%);

  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

@keyframes float {

  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(-30px, 20px, 0);
  }
}

/* ===== Layout Structure ===== */
.top,
.wrap {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  max-width: var(--page-width);
  margin: 0 auto;
}

.brand {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #b0b0b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  /* Standard property for compatibility */
  -webkit-text-fill-color: transparent;
}

.user .link {
  color: var(--text-sec);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.user .link:hover {
  color: var(--text-main);
}

.wrap {
  width: 94%;
  max-width: var(--page-width);
  margin: 20px auto 80px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(340px, 1fr);
  gap: 32px;
  align-items: start;
}

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

  .job-panel {
    order: -1;
    margin-bottom: 20px;
  }
}

/* ===== Glass Card Component ===== */
.card {
  background: var(--glass-bg);
  /* Use the new higher opacity var */
  backdrop-filter: blur(50px) saturate(180%);
  -webkit-backdrop-filter: blur(50px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  padding: 40px;
}

.card.subtle {
  background: rgba(35, 35, 35, 0.6);
  /* Lighter background for results */
  border: 1px solid rgba(255, 255, 255, 0.12);
}

h1 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 28px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
}

/* Form Elements */
label {
  display: block;
  color: var(--text-sec);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 4px;
}

.row {
  margin-bottom: 28px;
}

.help-text {
  font-size: 14px;
  color: var(--text-sec);
  margin-top: 8px;
  line-height: 1.4;
  padding-left: 4px;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 16px 18px;
  font-size: 16px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  /* Slightly lighter input bg */
  border: 1px solid rgba(255, 255, 255, 0.15);
  /* More visible border */
  border-radius: 16px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Lighter placeholder */

/* Custom Select Arrow */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398989d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 18px;
  padding-right: 48px;
}

select option {
  background: #2c2c2e;
  color: #fff;
}

/* Lighter dropdown bg */

/* Drops & Files */
.drop {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  /* More visible border */
  border-radius: 18px;
  padding: 40px;
  text-align: center;
  color: var(--text-sec);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  font-weight: 500;
}

.drop:hover {
  border-color: var(--accent-1);
  background: rgba(94, 92, 230, 0.08);
  /* Lighter hover state */
  color: var(--text-main);
}

.drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.12);
  /* Lighter chip */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-main);
  backdrop-filter: blur(10px);
}

.chip .muted {
  opacity: 0.7;
  font-size: 0.9em;
}

.chip .x {
  cursor: pointer;
  padding: 2px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.chip .x:hover {
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  border-radius: var(--btn-radius);
  border: none;
  cursor: pointer;
  transition: transform 0.1s, filter 0.2s, box-shadow 0.2s;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  backdrop-filter: blur(20px);
}

.btn.primary {
  background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
  color: #000;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  box-shadow: none;
  filter: grayscale(1);
}

.btn-danger {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
}

.btn-danger:hover {
  background: rgba(255, 69, 58, 0.25);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.actions {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 40px;
}

/* Modality Options */
.modality-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modality-option {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-sec);
  padding: 10px 20px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 15px;
  font-weight: 500;
}

.modality-option:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.modality-option.selected {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: #fff;
  box-shadow: 0 8px 24px rgba(94, 92, 230, 0.45);
}

/* ===== Right Side: Jobs Panel ===== */
.job-panel {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
}

.job-panel.card {
  backdrop-filter: blur(60px);
  background: rgba(30, 30, 30, 0.7);
  /* Dark but opaque enough */
}

.job-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.job-panel-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 6px 0 0;
}

.job-panel-actions {
  display: flex;
  gap: 8px;
}

.job-panel-actions .btn {
  padding: 6px 14px;
  font-size: 12px;
  height: auto;
  border-radius: 12px;
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding-right: 6px;
  flex: 1;
}

.job-list::-webkit-scrollbar {
  width: 6px;
}

.job-list::-webkit-scrollbar-track {
  background: transparent;
}

.job-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.job-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px;
  transition: all 0.2s;
}

.job-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translate3d(0, -1px, 0);
}

/* HW accel here */
.job-item.active {
  background: rgba(94, 92, 230, 0.12);
  border-color: rgba(94, 92, 230, 0.5);
  box-shadow: 0 0 0 1px rgba(94, 92, 230, 0.25);
}

.job-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.job-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-main);
}

.job-status {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 10px;
}

.job-status-queued {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-sec);
}

.job-status-processing {
  background: rgba(10, 132, 255, 0.25);
  color: #8bcfff;
}

.job-status-completed {
  background: rgba(50, 215, 75, 0.25);
  color: #8cfebf;
}

.job-status-failed {
  background: rgba(255, 69, 58, 0.25);
  color: #ff8b84;
}

.job-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  line-height: 1.4;
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.btn-pill {
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-pill:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ===== Result / Summary Output ===== */
.out {
  padding: 32px;
  background: rgba(0, 0, 0, 0.3);
  /* Slightly darker backing for text readability */
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
  line-height: 1.6;
}

.summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  /* Stronger divider */
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.summary-actions>div:first-child {
  flex: 1;
  min-width: 250px;
}

.summary-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.progress {
  background: rgba(255, 255, 255, 0.1);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 24px;
}

.progress-bar {
  background: var(--accent-4);
  height: 100%;
  width: 0;
  transition: width 0.3s ease-out;
}

.progress-pct {
  display: block;
  text-align: right;
  font-size: 13px;
  color: var(--text-sec);
  margin-top: 6px;
}

/* Business Case Grid Result - IMPROVED VISIBILITY */
.business-case-grid {
  display: grid;
  grid-template-columns: 160px auto 1fr 1fr;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.02);
  /* Slight tint for rows */
}

.business-case-grid:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.05);
  /* Lighter stripes */
}

.business-case-grid:last-child {
  border-bottom: none;
}

.business-case-grid .grid-header {
  color: var(--accent-4);
  /* Accent color for headers to pop */
  font-weight: 600;
}

/* Questionnaire Tables - IMPROVED VISIBILITY */
.questionnaire-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.03);
  /* Lighter background */
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Visible border */
  border-radius: 14px;
  overflow: hidden;
}

.questionnaire-table th,
.questionnaire-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  /* Separator lines */
  text-align: left;
}

.questionnaire-table th {
  background: rgba(255, 255, 255, 0.08);
  /* Stronger header background */
  color: #fff;
  font-weight: 600;
}

/* Code block / Raw Debug Visibility */
.job-summary-debug pre {
  background: rgba(0, 0, 0, 0.4) !important;
  /* Darker bg for code */
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #d1d1d6;
  /* Console-like text */
  border-radius: 12px;
  padding: 16px;
}

/* Animation Utils */
.glide-in {
  animation: glideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

@keyframes glideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Email Search Styles ===== */
.email-search-input {
  position: relative;
  margin-bottom: 16px;
}

.email-search-input input[type="search"] {
  width: 100%;
  padding: 18px 24px 18px 54px;
  font-size: 17px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.email-search-input input[type="search"]:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-1);
  box-shadow: 0 0 0 4px rgba(94, 92, 230, 0.15),
    0 8px 24px rgba(94, 92, 230, 0.2);
}

.email-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  font-size: 20px;
  pointer-events: none;
}

.search-status {
  min-height: 20px;
  transition: color 0.2s;
}

.search-status.searching {
  color: var(--accent-1);
}

.search-status.error {
  color: #ff453a;
}

.search-status.success {
  color: var(--accent-2);
}

.email-search-results {
  margin-top: 24px;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.email-search-results::-webkit-scrollbar {
  width: 8px;
}

.email-search-results::-webkit-scrollbar-track {
  background: transparent;
}

.email-search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.email-search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.email-result-card {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  animation: fadeSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.email-result-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.email-result-card:last-child {
  border-bottom: none;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.email-header {
  margin-bottom: 12px;
}

.email-subject {
  font-weight: 700;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.98);
  letter-spacing: -0.4px;
  line-height: 1.3;
  margin-bottom: 8px;
}

.email-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.email-from,
.email-to {
  color: var(--text-sec);
}

.email-date {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.email-meta-sep {
  opacity: 0.4;
}

.email-body-preview {
  margin: 16px 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.email-body-text {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.email-body-toggle {
  background: transparent;
  border: none;
  color: var(--accent-1);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0 0;
  margin-top: 8px;
  transition: all 0.2s;
}

.email-body-toggle:hover {
  color: var(--accent-4);
  text-decoration: underline;
}

.email-attachments {
  margin: 16px 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.email-attachments-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sec);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.attachment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.attachment-chip:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--accent-1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.attachment-icon {
  font-size: 16px;
  line-height: 1;
}

.attachment-name {
  font-weight: 500;
}

.attachment-size {
  opacity: 0.6;
  font-size: 11px;
  font-weight: 500;
}

.email-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.2s ease;
}

.email-result-card:hover .email-actions {
  opacity: 1;
  transform: translateY(0);
}

.btn-email-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(94, 92, 230, 0.15);
  border: 1px solid rgba(94, 92, 230, 0.3);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-email-action:hover {
  background: rgba(94, 92, 230, 0.25);
  border-color: rgba(94, 92, 230, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(94, 92, 230, 0.3);
}

.btn-email-action:active {
  transform: translateY(0);
}

.btn-email-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-email-action[data-action="download-pdf"] {
  background: rgba(10, 132, 255, 0.15);
  border-color: rgba(10, 132, 255, 0.3);
}

.btn-email-action[data-action="download-pdf"]:hover {
  background: rgba(10, 132, 255, 0.25);
  border-color: rgba(10, 132, 255, 0.5);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.no-results {
  padding: 60px 40px;
  text-align: center;
  color: var(--text-sec);
}

.no-results-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

.no-results-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.no-results-description {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 300px;
  margin: 0 auto;
  line-height: 1.5;
}

.email-search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-sec);
  gap: 12px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(94, 92, 230, 0.2);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.infinite-scroll-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.diagnostics-block {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
}
.diagnostics-block > summary { cursor: pointer; font-weight: 600; }
.diagnostics-body { margin-top: 10px; }
.diag-badge {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 4px 2px 0;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.diag-badge.diag-ok { background: rgba(72, 187, 120, 0.18); color: #8be4a2; border-color: rgba(72, 187, 120, 0.4); }
.diag-badge.diag-warn { background: rgba(237, 175, 76, 0.18); color: #f0c070; border-color: rgba(237, 175, 76, 0.4); }
.diag-badge.diag-err { background: rgba(235, 87, 87, 0.2); color: #f08b8b; border-color: rgba(235, 87, 87, 0.5); }
.diag-muted { color: var(--text-muted); }
.diag-errors { margin: 6px 0 8px 18px; color: #f08b8b; }
.diag-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.diag-table th, .diag-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}
.diag-table th { font-weight: 600; color: var(--text-muted); }
