:root {
  --bg-main: #0a0e17;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-hover: rgba(99, 102, 241, 0.4);
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #4f46e5 100%);
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-glow: rgba(99, 102, 241, 0.4);

  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.35);
  --accent-green: #10b981;
  
  --text-main: #f9fafb;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background Animated Blobs */
.background-decorations {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.22;
  animation: floatBlobs 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #6366f1, #4338ca);
  top: -100px;
  left: 15%;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #06b6d4, #0284c7);
  bottom: 5%;
  right: 10%;
  animation-duration: 25s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #8b5cf6, #d946ef);
  top: 40%;
  left: 60%;
  animation-duration: 18s;
}

@keyframes floatBlobs {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 30px) scale(0.95); }
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.app-header {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-card);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 23, 0.8);
}

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

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

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.45);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
  fill: #fff;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-title span {
  background: linear-gradient(135deg, #818cf8, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Modern Segmented Language Switcher */
.lang-segmented-control {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  padding: 3px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.lang-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.lang-pill.active {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-weight: 700;
}

.lang-flag {
  font-size: 0.95rem;
  line-height: 1;
}

.lang-name {
  letter-spacing: 0.02em;
}

/* Status Badge */
.worker-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #34d399;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Main Content */
.main-content {
  padding: 36px 20px 80px;
}

/* Search Card */
.search-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  margin-bottom: 32px;
  transition: border-color 0.2s;
}

.search-card:focus-within {
  border-color: rgba(99, 102, 241, 0.4);
}

.search-form {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-subtle);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.input-icon svg {
  width: 20px;
  height: 20px;
}

.input-wrapper input {
  width: 100%;
  height: 54px;
  padding: 0 135px 0 48px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: all 0.2s;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light), inset 0 2px 4px rgba(0, 0, 0, 0.2);
  background: rgba(15, 23, 42, 0.95);
}

/* Clear Button */
.btn-clear {
  position: absolute;
  right: 132px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-clear svg {
  width: 14px;
  height: 14px;
}

.btn-clear:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  transform: scale(1.1);
}

.domain-tag {
  position: absolute;
  right: 12px;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #818cf8;
  pointer-events: none;
}

/* Upgraded Main Fetch Button */
.btn-fetch {
  height: 54px;
  padding: 0 26px;
  background: var(--primary-gradient);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn-fetch:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px -2px rgba(99, 102, 241, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.06);
}

.btn-fetch:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.btn-fetch.loading .btn-icon {
  animation: spin 1s infinite linear;
}

.btn-icon svg {
  width: 19px;
  height: 19px;
}

.btn-shortcut {
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Recent History Chips */
.recent-chips-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.recent-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.chip-item {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.chip-item:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.chip-item.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: #818cf8;
}

.btn-clear-history {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-subtle);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 12px;
  margin-left: auto;
  transition: all 0.2s;
}

.btn-clear-history:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-filter-wrapper {
  position: relative;
  width: 280px;
}

.search-filter-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-subtle);
  pointer-events: none;
}

.filter-input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 36px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.filter-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Upgraded Interactive Toggle Cards */
.toggle-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.toggle-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.toggle-card input {
  display: none;
}

.toggle-switch {
  width: 34px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  position: relative;
  transition: background 0.25s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-card input:checked + .toggle-switch {
  background: var(--primary);
}

.toggle-card input:checked + .toggle-switch::after {
  transform: translateX(16px);
}

/* Specific Style when OTP Toggle is Checked */
#toggle-otp-label:has(input:checked) {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

#toggle-otp-label input:checked + .toggle-switch {
  background: var(--accent-amber);
}

/* Specific Style when Auto Refresh is Checked */
.auto-refresh-control .toggle-card:has(input:checked) {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.08);
}

.auto-refresh-control input:checked + .toggle-switch {
  background: var(--accent-cyan);
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}

.toggle-card:hover .toggle-label,
.toggle-card input:checked ~ .toggle-label {
  color: var(--text-main);
}

.counter-badge {
  padding: 2px 8px;
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
}

.auto-refresh-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
}

.pulse-radar {
  width: 7px;
  height: 7px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulseDot 1s infinite;
}

/* Results Section */
.results-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.results-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.results-meta {
  font-size: 0.85rem;
  color: var(--text-subtle);
  display: block;
  margin-top: 2px;
}

.count-badge {
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Email Feed */
.email-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Email Card */
.email-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.email-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.email-card.has-otp {
  border-left: 4px solid var(--accent-amber);
}

.card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #818cf8;
  flex-shrink: 0;
}

.email-card.has-otp .card-avatar {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.35);
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 12px;
}

.sender-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sender-email-sub {
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-weight: 400;
  margin-left: 6px;
}

.card-date {
  font-size: 0.75rem;
  color: var(--text-subtle);
  white-space: nowrap;
}

.card-subject {
  font-weight: 600;
  font-size: 1.02rem;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Upgraded OTP Pill Button */
.otp-pill {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.otp-pill:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--accent-amber);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--accent-amber-glow);
}

.otp-pill-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.otp-pill-code {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
  color: #fef3c7;
  letter-spacing: 0.08em;
}

.otp-pill-btn {
  padding: 3px 8px;
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  transition: all 0.2s;
}

.otp-pill:hover .otp-pill-btn {
  background: var(--accent-amber);
  color: #000;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
}

.empty-illustration {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.empty-illustration svg {
  width: 36px;
  height: 36px;
  position: relative;
  z-index: 2;
}

.glow-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--primary-glow);
  filter: blur(14px);
  z-index: 1;
}

.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 480px;
  margin: 0 auto;
}

.empty-state .highlight {
  color: #818cf8;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 820px;
  max-height: 85vh;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalEnter 0.25s ease-out;
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-subject {
  font-size: 1.18rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.modal-submeta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.meta-dot {
  color: var(--text-subtle);
}

.btn-close-modal {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Modal OTP Bar */
.modal-otp-bar {
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(239, 68, 68, 0.12));
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.otp-badge-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-amber);
  letter-spacing: 0.06em;
}

.otp-large-code {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fef3c7;
  letter-spacing: 0.12em;
}

.btn-action-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  color: #000;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-action-copy svg {
  width: 17px;
  height: 17px;
}

.btn-action-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  filter: brightness(1.08);
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 20px;
}

.tab-btn {
  padding: 14px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.tab-content {
  display: none;
  height: 100%;
}

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

.email-iframe {
  width: 100%;
  min-height: 380px;
  border: none;
  background: #ffffff;
  border-radius: var(--radius-sm);
}

.modal-text-content {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.6;
  color: #e2e8f0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 22px;
  background: #1e293b;
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 200;
  animation: slideToast 0.25s ease-out;
}

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

.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-green);
  color: #000;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

/* Footer */
.app-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border-card);
  text-align: center;
  color: var(--text-subtle);
  font-size: 0.82rem;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  .search-form {
    flex-direction: column;
  }
  .input-wrapper input {
    padding-right: 125px;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-filter-wrapper {
    width: 100%;
  }
  .toolbar-left, .toolbar-right {
    justify-content: space-between;
  }
}
