/* Phantom Mail - Full Dark Blue Theme */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #1a1a2e;
  color: #fff;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header */
.header {
  background: #1a1a2e;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  gap: 12px;
}

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

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

.logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
}

.logo-text {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
}

.logo-mail {
  color: #00d09c;
}

/* About Button */
.about-btn {
  background: #252540;
  border: 1px solid #3a3a5c;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.about-btn:hover {
  background: #3a3a5c;
  border-color: #00d09c;
}

.about-btn:active {
  transform: scale(0.96);
}

/* Main Section */
.main-section {
  background: #1a1a2e;
  padding: 50px 0 20px;
  text-align: center;
}

/* Email Container */
.email-container {
  border: 2px dashed #3a3a5c;
  border-radius: 16px;
  padding: 38px 32px;
  margin-bottom: 38px;
  background: rgba(37, 37, 64, 0.3);
}

.email-container h1 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 28px;
}

/* Desktop Email Layout (Default) */
.email-main-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.email-wrapper {
  flex: 0 1 auto;
  width: 100%;
  max-width: 480px;
  margin-bottom: 0;
}

.email-wrapper input {
  background: #252540;
  border: none;
  border-radius: 50px;
  padding: 16px 24px;
  color: #00d09c;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  width: 100%;
  text-align: left;
  outline: none;
  letter-spacing: -0.5px;
}

.primary-actions {
  margin-left: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Email input container with inline buttons */
.email-input-container {
  display: flex;
  align-items: center;
  background: #252540;
  border-radius: 50px;
  padding: 6px 6px 6px 24px;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  transition: box-shadow 0.3s ease;
}

.email-input-container:hover {
  box-shadow: 0 0 20px rgba(0, 208, 156, 0.15);
}

.email-input-container .email-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 0;
  color: #00d09c;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  outline: none;
  min-width: 0;
}

/* QR Wrapper with Dropdown */
.qr-wrapper {
  position: relative;
  flex-shrink: 0;
}

.qr-btn-inline {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
  background: #3a3a5c;
  color: #fff;
  will-change: transform;
}

.qr-btn-inline:hover {
  background: #4a4a6c;
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(0, 208, 156, 0.3);
}

.qr-btn-inline:active {
  transform: scale(0.92);
}

/* QR Dropdown Popup */
.qr-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 100;
  animation: dropdownFade 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Arrow pointing up to button */
.qr-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #fff;
}

.qr-dropdown canvas {
  display: block;
  border-radius: 10px;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* Hide mobile-only elements on desktop */
.mobile-actions {
  display: none;
}

.secondary-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 35px;
}

.big-copy-btn {
  background: #00d09c;
  color: #fff;
  border: none;
  padding: 0 25px;
  height: 52px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
  will-change: transform;
}

.big-copy-btn:hover {
  background: #00b386;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 208, 156, 0.35);
}

.big-copy-btn:active {
  transform: scale(0.96) translateY(0);
  box-shadow: none;
}

.big-copy-btn.copied {
  background: #00b386;
}

.action-btn-small {
  background: #252540;
  border: 1px solid #3a3a5c;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  will-change: transform;
}

.action-btn-small:hover {
  background: #3a3a5c;
  border-color: #00d09c;
  transform: translateY(-1px);
}

.action-btn-small:active {
  transform: scale(0.95) translateY(0);
}

/* Save Email button — always visible, tinted green */
.action-btn-small.save-email-btn {
  background: rgba(0, 208, 156, 0.1);
  border-color: rgba(0, 208, 156, 0.3);
  color: #00d09c;
}
.action-btn-small.save-email-btn:hover {
  background: rgba(0, 208, 156, 0.2);
  border-color: #00d09c;
}

.tagline {
  color: #888;
  font-size: 15px;
  margin-bottom: 0;
}

/* Quote Section (After Inbox) */
.quote-section {
  background: #1a1a2e;
  padding: 15px 0 20px;
}

.quote-section .quote-box {
  background: rgba(0, 208, 156, 0.12);
  border: 1px solid rgba(0, 208, 156, 0.25);
  border-radius: 12px;
  padding: 16px 24px;
  text-align: center;
}

.quote-section .quote-text {
  color: #00d09c;
  font-size: 14px;
  font-style: italic;
  margin-bottom: 6px;
}

.quote-section .quote-author {
  color: rgba(0, 208, 156, 0.7);
  font-size: 12px;
  text-align: right;
}

/* Inbox Section */
.inbox-section {
  background: #1a1a2e;
  padding: 20px 0 40px;
  min-height: 400px;
}

.inbox-wrapper {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

/* Inbox Header */
.inbox-header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #0d0d1a;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  padding: 14px 28px;
}

.col-sender {
  text-align: left;
  flex: 1;
}

.col-subject {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.col-view {
  text-align: right;
  flex: 1;
}

.inbox-body {
  min-height: 380px;
  max-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: #fff;
}

/* Empty Inbox with Loading Animation */
.empty-inbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.loading-animation {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 25px;
}

.loading-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Static Envelope */
.envelope-icon {
  fill: #C6C9D6;
}

/* Animated Arrows */
.arrows-ring {
  fill: #E3E5EB;
  transform-origin: center;
  animation: spin 2s linear infinite;
  will-change: transform;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Skeleton shimmer for loading state */
.skeleton-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 2fr) 60px;
  padding: 18px 28px;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
  gap: 12px;
}

.skeleton-cell {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-cell.short {
  width: 60%;
}

.skeleton-cell.long {
  width: 85%;
}

.skeleton-cell.tiny {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Hide old styles */
.loading-arrows {
  display: none;
}

.loading-icon {
  display: none;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.empty-subtitle {
  font-size: 14px;
  color: #00d09c;
}

/* Email List */
.email-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 2fr) 60px;
  padding: 18px 28px;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
  color: #333;
}

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

.email-row:hover {
  background: #f5fff9;
  transform: translateX(3px);
}

.email-row:active {
  background: #ecfdf5;
}

.email-row.unread {
  background: #f0fffa;
  border-left: 3px solid #00d09c;
}

.email-sender {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sender-name {
  font-weight: 600;
  font-size: 14px;
  color: #222;
}

.sender-email-small {
  font-size: 12px;
  color: #00b386;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.email-subject {
  color: #555;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 12px;
  display: flex;
  align-items: center;
}

.email-view {
  text-align: right;
}

.view-arrow {
  color: #ccc;
  font-size: 20px;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.email-row:hover .view-arrow {
  color: #00d09c;
  transform: translateX(3px);
}

/* Features Section */
.features-section {
  background: #1a1a2e;
  padding: 55px 0 80px;
}

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

.feature-card {
  background: #252540;
  border: 1px solid #3a3a5c;
  border-radius: 18px;
  padding: 35px 24px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: #00d09c;
  box-shadow: 0 12px 30px rgba(0, 208, 156, 0.15);
}

.feature-card .feature-icon {
  font-size: 42px;
  margin-bottom: 18px;
  display: block;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  color: #888;
  line-height: 1.5;
}

/* ========== Modals (Smooth Animate-in) ========== */
/* Base overlay — hidden via visibility + opacity so content is removed from
   the accessibility tree and keyboard focus cannot reach it while closed */
.modal,
.about-modal,
.qr-modal,
.premium-modal,
.auth-modal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  /* hidden state — visibility:hidden removes element from accessibility tree */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  /* delay visibility change until after opacity fade completes (0.22s) */
  transition: opacity 0.22s ease, visibility 0s linear 0.22s;
  will-change: opacity;
}

.modal {
  background: rgba(0, 0, 0, 0.80);
}

.about-modal {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
}

.qr-modal {
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
}

.auth-modal {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
}

/* visible state */
.modal.show,
.about-modal.show,
.qr-modal.show,
.auth-modal.show {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
  /* show visibility immediately, then fade in opacity */
  transition: opacity 0.22s ease, visibility 0s linear 0s;
}

/* Inner card animation */
.modal-content,
.qr-content {
  transform: scale(0.93) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.36, 0.64, 1), opacity 0.22s ease;
  opacity: 0;
  will-change: transform, opacity;
}

.modal.show .modal-content,
.qr-modal.show .qr-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Auth + About use the same slide-up animation as the premium popup */
.about-modal.show .about-content,
.auth-modal.show .auth-content {
  animation: pvSlideUp 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

/* Modal Specific Styles */
.modal-content {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 860px;
  margin-top: 50px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-top-header {
  background: #1a1a2e;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s, transform 0.15s;
}

.back-btn:hover {
  color: #00d09c;
  transform: translateX(-2px);
}

.back-btn span {
  font-size: 20px;
  line-height: 1;
}

.action-link {
  background: none;
  border: none;
  color: #aaa;
  font-size: 14px;
  cursor: pointer;
  margin-left: 15px;
  transition: color 0.2s;
}

.action-link:hover {
  color: #fff;
}

.action-link.active {
  color: #00d09c;
}

/* Source view */
.source-view-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.source-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #1a1a2e;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.source-view-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.source-copy-btn {
  background: rgba(0,208,156,0.15);
  color: #00d09c;
  border: 1px solid rgba(0,208,156,0.3);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s;
}
.source-copy-btn:hover { background: rgba(0,208,156,0.28); }
.source-code-block {
  margin: 0;
  padding: 16px;
  background: #12121f;
  color: #c9d1d9;
  font-family: 'Fira Code','Cascadia Code','Consolas','Courier New',monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  word-break: normal;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-sender-section {
  padding: 24px;
  border-bottom: 1px solid #eee;
}

.sender-info-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sender-avatar {
  width: 48px;
  height: 48px;
  background: #f0fffa;
  color: #00d09c;
  border: 1px solid #00d09c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

.sender-details {
  flex: 1;
  overflow: hidden;
}

.sender-name-full {
  font-weight: 700;
  font-size: 16px;
  color: #333;
  margin-bottom: 4px;
}

.sender-email {
  font-size: 13px;
  color: #666;
}

.email-date {
  text-align: right;
  color: #888;
  font-size: 12px;
}

.date-value {
  color: #00d09c;
  margin-top: 4px;
}

.modal-subject-section {
  padding: 20px 24px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 10px;
}

.subject-label {
  color: #888;
  font-size: 14px;
}

.subject-value {
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

/* To / CC / BCC rows — only injected when the field is present */
.modal-meta-rows {
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

.modal-meta-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 24px;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
}

.modal-meta-label {
  color: #888;
  min-width: 32px;
  flex-shrink: 0;
}

.modal-meta-value {
  color: #555;
  word-break: break-word;
  overflow-wrap: break-word;
}

.modal-body {
  padding: 24px;
  color: #444;
  line-height: 1.6;
  font-size: 15px;
  min-height: 200px;
  overflow-x: auto;
}

/* Email iframe rendered inside the modal body */
.modal-body iframe {
  width: 100%;
  border: none;
  display: block;
  min-height: 200px;
  border-radius: 4px;
}

.modal-attachments {
  padding: 20px 24px;
  background: #f9f9f9;
  border-top: 1px solid #eee;
}

.modal-attachments h4 {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
}

.attachment-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  margin-right: 10px;
  margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.attachment-item:hover {
  border-color: #00d09c;
  box-shadow: 0 2px 8px rgba(0, 208, 156, 0.2);
}

/* ── Attachment Grid ───────────────────────────────────── */
#modal-attachments h4 {
  margin: 0 0 12px;
  font-size: 13px;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.att-image-grid {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
}
.att-cols-1 { grid-template-columns: 1fr; }
.att-cols-2 { grid-template-columns: 1fr 1fr; }
.att-cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.att-img-cell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #111;
  border-radius: 6px;
}
.att-cols-1 .att-img-cell {
  aspect-ratio: unset;
  max-height: 400px;
}
.att-cols-1 .att-img-cell img {
  object-fit: contain !important;
  max-height: 400px;
}
.att-img-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  background: rgba(0,0,0,0.55);
  font-size: 10px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 0 0 6px 6px;
}
/* Download button overlaid in the top-right corner of image cells */
.att-img-dl-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
  line-height: 1.2;
}
.att-img-cell:hover .att-img-dl-btn {
  opacity: 1;
}

/* ── Attachment Cards ──────────────────────────────────── */
/* The modal uses a white/light background, so cards use dark text on white */
.att-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  transition: background 0.15s, border-color 0.15s;
}
.att-card-clickable {
  cursor: pointer;
}
.att-card-clickable:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}
.att-card-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.att-card-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}
.att-card-meta {
  flex: 1;
  min-width: 0;
}
.att-card-name {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.att-card-size {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.att-card-action {
  font-size: 18px;
  color: #00d09c;
  flex-shrink: 0;
  opacity: 0.8;
}
/* Dedicated download button for unsupported file types */
.att-download-btn {
  flex-shrink: 0;
  background: #00d09c;
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.att-download-btn:hover {
  background: #00b889;
  opacity: 1;
}

/* ── Attachment Lightbox ───────────────────────────────── */
.att-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.att-lightbox.show {
  display: flex;
}
.att-lb-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background 0.2s;
}
.att-lb-close:hover { background: rgba(255,255,255,0.25); }
.att-lb-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 95vw;
  max-height: 90vh;
}
.att-lb-filename {
  position: absolute;
  bottom: 20px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  max-width: 80vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hidden {
  display: none !important;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px) scale(0.9);
  background: #222;
  color: #fff;
  padding: 11px 28px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2000;
  pointer-events: none;
  white-space: nowrap;
  will-change: transform, opacity;
}

.toast.show {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
}

/* Footer */
.footer {
  background: #151525;
  padding: 22px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

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

.footer-name {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.footer-mail {
  color: #00d09c;
}

.footer-tagline {
  color: #666;
  font-size: 14px;
}

.footer-links {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-links-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s;
}

.footer-btn:hover {
  transform: translateY(-2px);
}

.footer-btn.primary {
  background: #00d09c;
  color: #fff;
}

.footer-btn.primary:hover {
  background: #00b386;
}

.footer-copy {
  color: #555;
  font-size: 11px;
}

.footer-policy-links {
  gap: 6px;
}

.footer-btn.footer-policy {
  padding: 8px 16px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #999;
}

.footer-btn.footer-policy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

@media (max-width: 600px) {
  .footer-policy-links {
    gap: 4px;
  }

  .footer-btn.footer-policy {
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* About Modal */
.about-content {
  background: #14142a;
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

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

.about-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.about-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.about-close:hover {
  background: rgba(255, 107, 107, 0.15);
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.about-body {
  padding: 24px;
}

.about-desc {
  color: #aaa;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.about-body h3 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 16px;
}

.features-list {
  margin-bottom: 24px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-ico {
  font-size: 24px;
  flex-shrink: 0;
}

.feature-item strong {
  color: #fff;
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.feature-item p {
  color: #888;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.about-actions {
  display: flex;
  gap: 12px;
}

.about-link-btn {
  flex: 1;
  display: inline-block;
  background: #252540;
  border: 1px solid #3a3a5c;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.about-link-btn:hover {
  background: #3a3a5c;
  border-color: #00d09c;
  transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 600px) {
  /* Email modal: remove container padding so the card fills the screen */
  .modal {
    padding: 0;
    align-items: flex-start;
  }

  .header {
    padding: 12px 15px;
    gap: 8px;
  }

  .logo {
    display: inline-flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
  }

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

  .logo-text {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .premium-btn {
    padding: 7px 12px;
    font-size: 12px;
    animation: none;
    border-radius: 20px;
    white-space: nowrap;
  }

  .about-btn {
    display: none;
  }

  .desktop-only {
    display: none !important;
  }

  /* Mobile actions */
  .mobile-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
  }

  .mobile-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    border: none;
    will-change: transform;
  }

  .mobile-action-btn:active {
    transform: scale(0.94);
  }

  .mobile-action-btn.qr-mobile {
    background: #3a3a5c;
    color: #fff;
  }

  .mobile-action-btn.qr-mobile:hover {
    background: #4a4a6c;
  }

  .mobile-action-btn.copy-mobile {
    background: #00d09c;
    color: #fff;
  }

  .mobile-action-btn.copy-mobile:hover {
    background: #00b386;
  }

  /* Mobile QR wrapper */
  .qr-wrapper-mobile {
    position: relative;
  }

  .qr-dropdown-mobile {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    z-index: 200;
    animation: dropdownFade 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .qr-dropdown-mobile::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid #fff;
  }

  .qr-dropdown-mobile canvas {
    display: block;
    border-radius: 8px;
    max-width: 160px;
    max-height: 160px;
  }

  /* Email input full width */
  .email-input-container {
    max-width: 100%;
    padding: 16px 18px;
    border-radius: 14px;
  }

  .email-input-container .email-input {
    font-size: 14px;
    word-break: break-all;
    text-align: center;
    width: 100%;
  }

  .email-container {
    padding: 25px 20px;
    border-radius: 20px;
    background: #1a1a2e;
    border: 1px solid #3a3a5c;
  }

  .email-main-row {
    display: block;
    width: 100%;
  }

  .email-wrapper {
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
  }

  .email-wrapper input {
    width: 100%;
    padding: 15px 15px;
    font-size: 13px;
    background: #252540;
    border-radius: 12px;
    text-align: center;
    color: #fff;
    letter-spacing: 0;
  }

  .primary-actions {
    margin-left: 0;
    width: 100%;
  }

  .big-copy-btn {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
  }

  .secondary-actions {
    margin-top: 20px;
    gap: 10px;
  }

  .action-btn-small {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
    font-size: 12px;
    flex-direction: column;
    gap: 5px;
  }

  /* Inbox Mobile */
  .inbox-header {
    padding: 12px 14px;
    font-size: 11px;
  }

  .col-sender {
    flex: 1;
  }

  .col-subject {
    display: none;
  }

  .col-view {
    display: none;
  }

  .email-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "sender arrow"
      "subject arrow";
    padding: 13px 14px;
    row-gap: 4px;
    align-items: center;
    column-gap: 10px;
  }

  .email-sender {
    grid-area: sender;
    min-width: 0;
  }

  .email-subject {
    grid-area: subject;
    padding: 0;
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .email-view {
    grid-area: arrow;
    align-self: center;
    text-align: right;
  }

  .skeleton-row {
    grid-template-columns: 1fr 30px;
    padding: 13px 14px;
  }

  .email-row:hover {
    transform: none;
  }

  .sender-email-small {
    display: none;
  }

  .sender-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
  }

  .modal-content {
    margin-top: 0;
    height: 100dvh;
    height: 100vh; /* fallback for older browsers */
    max-height: 100vh;
    border-radius: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
  }

  .modal-top-header {
    padding: 12px 14px;
    flex-shrink: 0;
  }

  .modal-sender-section {
    padding: 12px 14px;
    flex-shrink: 0;
  }

  .sender-info-row {
    gap: 10px;
  }

  .sender-avatar {
    width: 36px;
    height: 36px;
    font-size: 15px;
    flex-shrink: 0;
  }

  .sender-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .sender-name-full {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sender-email {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .email-date {
    font-size: 11px;
    flex-shrink: 0;
    white-space: nowrap;
    text-align: right;
  }

  .modal-subject-section {
    padding: 10px 14px;
    flex-shrink: 0;
    flex-direction: column;
    gap: 4px;
  }

  .subject-label {
    font-size: 11px;
  }

  .subject-value {
    font-size: 13px;
    word-break: break-word;
  }

  .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px;
    font-size: 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overscroll-behavior: contain;
  }

  /* Constrain the iframe to the modal body width on mobile */
  .modal-body iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden;
    display: block;
  }

  /* Constrain HTML email content to viewport on mobile */
  .modal-body img {
    max-width: 100% !important;
    height: auto !important;
  }

  .modal-body table {
    max-width: 100% !important;
    width: 100% !important;
    table-layout: fixed !important;
    min-width: 0 !important;
  }

  .modal-body td,
  .modal-body th {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    min-width: 0 !important;
  }

  .modal-body * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Prevent the modal content from overflowing the screen horizontally */
  .modal-content {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .footer {
    padding: 30px 15px;
  }

  .footer-btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .about-content {
    max-width: 100%;
    height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .about-body {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
  }

  .about-actions {
    flex-direction: column;
    margin-top: 20px;
  }
}

/* Header Actions (Premium + About) */
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* Desktop: ensure logo can shrink to accommodate header-actions */
.logo {
  flex-shrink: 1;
  min-width: 48px; /* Never collapse below the logo icon */
  overflow: hidden;
}

.logo-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Medium screens (601px – 900px): compact header to prevent overflow */
@media (min-width: 601px) and (max-width: 900px) {
  .logo-icon { font-size: 26px; }
  .logo-text { font-size: 20px; letter-spacing: 1px; }

  /* Keep about-btn visible on all desktop sizes */

  .premium-btn {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 20px;
    animation: none;
  }

  .auth-action-btn {
    font-size: 12px;
    padding: 7px 13px;
    max-width: 100px;
  }

  .auth-status-text {
    max-width: 80px;
    font-size: 12px;
  }
}

.premium-btn {
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  border: none;
  color: #1a1a2e;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
  animation: premiumPulse 2.5s ease-in-out infinite;
  will-change: transform, box-shadow;
}

@keyframes premiumPulse {

  0%,
  100% {
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
  }

  50% {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.55);
  }
}

.premium-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6);
  animation: none;
}

.premium-btn:active {
  transform: scale(0.97);
}

/* QR Button */
.qr-btn {
  background: #252540;
  border: 1px solid #3a3a5c;
  color: #fff;
  padding: 12px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  margin-left: 10px;
}

.qr-btn:hover {
  background: #3a3a5c;
  border-color: #00d09c;
}

/* QR Inline Content */
.qr-content {
  background: #1a1a2e;
  border-radius: 16px;
  width: 100%;
  max-width: 350px;
  border: 1px solid #3a3a5c;
  overflow: hidden;
}

.qr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #3a3a5c;
}

.qr-header h2 {
  font-size: 16px;
  color: #fff;
}

.qr-close {
  background: #252540;
  border: none;
  color: #888;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.qr-close:hover {
  background: #3a3a5c;
  color: #fff;
}

.qr-body {
  padding: 24px;
  text-align: center;
}

#qr-code-container {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 16px;
}

#qr-code-container canvas {
  display: block;
}

.qr-email {
  color: #00d09c;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-bottom: 8px;
  word-break: break-all;
}

.qr-hint {
  color: #888;
  font-size: 12px;
}

/* Premium Modal */
/* ===== Premium Flow Overlay (Dark Glass Theme) ===== */
.premium-flow-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 8, 14, 0.96);
  /* Darker backdrop */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow-y: auto;
  padding: 20px;
}

.premium-flow-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.pf-container {
  background: rgba(22, 22, 38, 0.4);
  /* Glass pane */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  width: 100%;
  max-width: 680px;
  padding: 40px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 0 40px rgba(255, 255, 255, 0.02);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  /* Glow behind the container */
  background-image: radial-gradient(circle at 50% 0%, rgba(255, 215, 0, 0.05) 0%, transparent 60%);
}

.premium-flow-overlay.show .pf-container {
  transform: translateY(0) scale(1);
}

/* Glassmorphism Helper Classes */
.glass-panel {
  background: rgba(30, 30, 50, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
}

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

.pf-back {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.pf-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateX(-2px);
}

.pf-steps {
  display: flex;
  gap: 10px;
}

.pf-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.4s ease;
}

.pf-step-dot.active {
  background: #ffd700;
  transform: scale(1.4);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.pf-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #ccc;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.pf-close:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff6b6b;
  transform: rotate(90deg);
}

/* Step Common */
.pf-step {
  animation: pfFadeUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes pfFadeUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

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

.pf-title {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.pf-title .gold {
  background: linear-gradient(to right, #ffd700, #ff8c00);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.pf-subtitle {
  color: #8b8baf;
  font-size: 15px;
  text-align: center;
  margin-bottom: 30px;
}

/* Step 1: Features */
.pf-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.pf-feat {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.pf-feat:hover {
  background: rgba(40, 40, 70, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.pf-icon {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.pf-feat-text {
  font-size: 13px;
  color: #8b8baf;
  line-height: 1.5;
}

.pf-feat-text strong {
  color: #fff;
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}

/* Step 1: Comparison Table */
.plan-compare {
  margin-bottom: 30px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.compare-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
  align-items: center;
  transition: background 0.2s;
}

.compare-row:hover:not(.header-row) {
  background: rgba(255, 255, 255, 0.02);
}

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

.header-row {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
}

.col-feature {
  color: #d1d1e0;
}

.col-free {
  text-align: center;
  color: #8b8baf;
}

.col-premium {
  text-align: center;
  color: #fff;
  font-weight: 600;
  position: relative;
}

.check-icon {
  color: #00d09c;
  margin-right: 6px;
  text-shadow: 0 0 10px rgba(0, 208, 156, 0.5);
}

.header-row .col-feature {
  color: #8b8baf;
}

.header-row .col-free {
  color: #8b8baf;
}

.header-row .col-premium.gold {
  color: #ffd700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Step 1: Pricing Section */
.pf-pricing-section {
  position: relative;
  margin-top: 10px;
  padding-top: 30px;
}

.pf-pricing-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.pf-pricing-options {
  display: flex;
  gap: 20px;
}

.pf-price-card {
  flex: 1;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  color: #fff;
  background: rgba(20, 20, 35, 0.6);
}

.pf-price-card:hover {
  background: rgba(30, 30, 50, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.pf-price-card.featured {
  background: linear-gradient(180deg, rgba(30, 30, 50, 0.8) 0%, rgba(255, 215, 0, 0.05) 100%);
  border-color: rgba(255, 215, 0, 0.3);
}

.pf-price-card.featured:hover {
  background: linear-gradient(180deg, rgba(40, 40, 60, 0.9) 0%, rgba(255, 215, 0, 0.1) 100%);
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 0 15px 30px rgba(255, 215, 0, 0.15);
}

/* The selected state */
.pf-price-card.active {
  border-color: #00d09c;
  background: rgba(0, 208, 156, 0.05);
  box-shadow: 0 0 0 1px #00d09c, 0 10px 30px rgba(0, 208, 156, 0.2);
}

.pf-price-card.featured.active {
  border-color: #ffd700;
  background: linear-gradient(180deg, rgba(40, 40, 60, 0.9) 0%, rgba(255, 215, 0, 0.15) 100%);
  box-shadow: 0 0 0 2px #ffd700, 0 15px 40px rgba(255, 215, 0, 0.25);
}

.glow-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #ffd700, #ffa500);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.pf-card-head {
  font-size: 16px;
  font-weight: 600;
  color: #aaa;
  margin-bottom: 12px;
}

.pf-price-card.featured .pf-card-head {
  color: #ffd700;
}

.pf-card-price {
  font-size: 36px;
  font-weight: 700;
}

.pf-card-price span {
  font-size: 16px;
  font-weight: 400;
  color: #666;
}

.pf-card-save {
  margin-top: 8px;
  color: #00d09c;
  font-size: 13px;
  font-weight: 600;
}

/* Continue Button Wrapper & Button */
.pf-continue-wrapper {
  margin-top: 28px;
  text-align: center;
}

.pf-continue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #00d09c 0%, #00b386 100%);
  color: #fff;
  border: none;
  padding: 16px 48px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0, 208, 156, 0.35);
  will-change: transform;
}

.pf-continue-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 30px rgba(0, 208, 156, 0.5);
}

.pf-continue-btn:active {
  transform: scale(0.97);
  box-shadow: none;
}

/* Glass button helper */
.glass-btn {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* pf-badge base style (positioning handled by glow-badge) */
.pf-badge {
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Modal actions row */
.modal-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Email date label */
.date-label {
  color: #aaa;
  font-size: 11px;
  margin-bottom: 2px;
}

/* Step 2: Auth */
.pf-auth-box {
  background: #1a1a2e;
  border: 1px solid #3a3a5c;
  border-radius: 16px;
  padding: 24px;
  margin: 0 auto;
  max-width: 440px;
}

/* Step 3: Checkout */
.pf-summary-box {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  font-size: 16px;
  margin-bottom: 24px;
}

.pf-summary-box span {
  color: #aaa;
  margin-right: 8px;
}

.pf-summary-box strong {
  color: #ffd700;
  font-size: 18px;
}

.pf-instruction {
  font-size: 15px;
  font-weight: 600;
  color: #eee;
  margin-bottom: 12px;
}

.pf-crypto-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.pf-crypto-btn {
  flex: 1;
  background: #252540;
  border: 1px solid #3a3a5c;
  color: #aaa;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pf-crypto-btn.active {
  background: #00d09c;
  border-color: #00d09c;
  color: #111;
}

.pf-crypto-display {
  background: #1a1a2e;
  border: 1px solid #3a3a5c;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.pf-crypto-address-box {
  display: flex;
  gap: 10px;
  background: #0f0f1a;
  padding: 12px;
  border-radius: 8px;
  align-items: center;
}

.pf-crypto-address-box code {
  flex: 1;
  color: #ffd700;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-copy-btn {
  background: #3a3a5c;
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.pf-copy-btn:hover {
  background: #55557a;
}

.pf-network-hint {
  font-size: 12px;
  color: #888;
  margin-top: 10px;
  text-align: center;
}

.pf-telegram-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #0088cc, #00aaff);
  color: #fff;
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pf-telegram-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 136, 204, 0.3);
}

@media (max-width: 600px) {
  .pf-features-grid {
    grid-template-columns: 1fr;
  }

  .pf-pricing-options {
    flex-direction: column;
  }

  .pf-container {
    padding: 20px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .pf-crypto-address-box {
    flex-direction: column;
    align-items: stretch;
  }

  .pf-crypto-address-box code {
    text-align: center;
  }

  .pf-auth-box {
    padding: 16px;
  }
}

/* Auth Modal */
.auth-content {
  background: rgba(20, 20, 42, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
}

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.auth-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.auth-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.auth-close:hover {
  background: rgba(255, 107, 107, 0.15);
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.auth-body {
  padding: 28px;
}

.auth-body>p {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 16px;
}

.auth-form {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-input {
  flex: 1;
  width: 100%;
  background: #131320;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 13px 16px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.auth-input:focus {
  border-color: #00d09c;
  background: #0e0e1e;
}

.auth-input::placeholder {
  color: #555;
}

.auth-send-btn {
  background: #00d09c;
  border: none;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.auth-send-btn:hover {
  background: #00b386;
}

.auth-send-btn:disabled {
  background: #3a3a5c;
  cursor: not-allowed;
}

.otp-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #3a3a5c;
}

.otp-section p {
  color: #aaa;
  font-size: 13px;
  margin-bottom: 12px;
}

.otp-input {
  width: 100%;
  background: #252540;
  border: 1px solid #3a3a5c;
  border-radius: 8px;
  padding: 14px;
  color: #00d09c;
  font-size: 24px;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  letter-spacing: 8px;
  outline: none;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}

.otp-input:focus {
  border-color: #00d09c;
}

.auth-verify-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #00d09c 0%, #00b386 100%);
  border: none;
  color: #fff;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 208, 156, 0.3);
  letter-spacing: 0.3px;
}

.auth-verify-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 208, 156, 0.45);
}

.auth-verify-btn:active {
  transform: scale(0.98);
  box-shadow: none;
}

.auth-error {
  color: #ff6b6b;
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
}

/* Buy Me a Coffee Button */
.footer-btn.coffee {
  background: #ffdd00;
  color: #1a1a2e;
}

.footer-btn.coffee:hover {
  background: #ffc800;
}

/* Mobile Premium/Header Adjustments */
@media (max-width: 600px) {
  .primary-actions {
    display: flex;
    gap: 10px;
  }

  .qr-btn {
    margin-left: 0;
    padding: 14px;
  }

  .footer-links-row {
    flex-direction: column;
    align-items: center;
  }

  .footer-btn.coffee {
    margin-right: 0;
  }
}

/* ===== Auth Modal Tabs ===== */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  background: #131320;
  border-radius: 12px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: #666;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.active {
  background: #00d09c;
  color: #fff;
}

.auth-tab:not(.active):hover {
  color: #ccc;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  margin-top: 14px;
}

.auth-label:first-child {
  margin-top: 0;
}

.auth-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #555;
  font-size: 11px;
}

.auth-input+.auth-input {
  margin-top: 10px;
}

#signin-section .auth-verify-btn,
#signup-section .auth-verify-btn {
  margin-top: 14px;
}

#signin-form,
#signup-form {
  margin: 0;
}

/* Auth Warning Box */
.auth-warning {
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: #ffc107;
  line-height: 1.5;
  margin: 12px 0;
}

.auth-warning strong {
  color: #ffdd57;
}

/* ===== OTP / Forgot Password Auth Elements ===== */
.auth-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  color: #c8c8dc;
}
.auth-back-btn {
  background: none;
  border: none;
  color: #00d09c;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
  font-family: inherit;
}
.auth-back-btn:hover { background: rgba(0,208,156,0.1); }

.auth-step-desc {
  font-size: 13px;
  color: #888;
  margin: 0 0 16px;
  line-height: 1.5;
}

.otp-input {
  text-align: center;
  font-size: 24px;
  letter-spacing: 8px;
  font-weight: 700;
  font-family: monospace;
}

.auth-resend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
  color: #888;
}
.auth-link-btn {
  background: none;
  border: none;
  color: #00d09c;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}
.auth-link-btn:hover { color: #00b88a; }

.auth-forgot-row {
  text-align: center;
  margin-top: 10px;
}

.auth-required {
  color: #ff6b6b;
  font-size: 11px;
}

.auth-email-notice {
  background: rgba(0,208,156,0.08);
  border: 1px solid rgba(0,208,156,0.2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #00d09c;
  margin-bottom: 14px;
}

/* ===== Plan Comparison ===== */
.plan-compare {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.plan-col {
  flex: 1;
  border-radius: 12px;
  padding: 16px;
  background: #252540;
  border: 1px solid #3a3a5c;
}

.plan-col.premium-col {
  border-color: #ffd700;
  background: linear-gradient(160deg, #252540 0%, rgba(255, 215, 0, 0.07) 100%);
}

.plan-label {
  font-size: 13px;
  font-weight: 700;
  color: #aaa;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.plan-label.gold {
  color: #ffd700;
}

.plan-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.plan-list li {
  font-size: 12px;
  line-height: 1.3;
}

.plan-list li.yes {
  color: #ccc;
}

.plan-list li.no {
  color: #555;
}

.plan-col.premium-col .plan-list li.yes {
  color: #e0e0e0;
}

@media (max-width: 600px) {
  .plan-compare {
    flex-direction: column;
  }
}
/* ===== Auth Status Section ===== */
.auth-status-section {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

.auth-status-text {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
  cursor: pointer;
  transition: color 0.2s;
}
.auth-status-text:hover { color: #fff; }

.auth-action-btn {
  background: transparent;
  border: 1.5px solid rgba(0, 208, 156, 0.5);
  color: #00d09c;
  padding: 9px 18px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 0 12px rgba(0, 208, 156, 0.12), inset 0 0 12px rgba(0, 208, 156, 0.04);
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-action-btn:hover {
  background: linear-gradient(135deg, #00d09c 0%, #00b386 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 208, 156, 0.45), 0 0 0 1px rgba(0, 208, 156, 0.3);
  transform: translateY(-2px) scale(1.04);
}

.auth-action-btn:active {
  transform: scale(0.96);
  box-shadow: none;
}

.auth-action-btn.signout-btn {
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff9999;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.08);
}

.auth-action-btn.signout-btn:hover {
  background: rgba(255, 107, 107, 0.15);
  border-color: #ff6b6b;
  color: #ff6b6b;
  box-shadow: 0 4px 14px rgba(255, 107, 107, 0.25);
  transform: translateY(-2px) scale(1.04);
}

/* User avatar circle — shows username initial when logged in */
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d09c, #0088cc);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s, transform 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.user-avatar:hover { opacity: 0.85; transform: scale(1.05); }
.user-avatar:active { transform: scale(0.95); }

.user-avatar.premium-avatar {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a1a2e;
}

/* ===== Premium Dashboard ===== */
.premium-dashboard {
  padding: 0 0 40px;
}

.premium-dashboard.hidden {
  display: none;
}

.pdash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.pdash-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffd700;
}

.pdash-user {
  font-size: 13px;
  color: #888;
  background: #1a1a2e;
  border: 1px solid #3a3a5c;
  padding: 5px 12px;
  border-radius: 20px;
}

.pdash-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pdash-tab {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #3a3a5c;
  background: #1a1a2e;
  color: #888;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pdash-tab.active {
  background: rgba(255, 215, 0, 0.15);
  border-color: #ffd700;
  color: #ffd700;
}

.pdash-tab:hover:not(.active) {
  color: #ccc;
  border-color: #555;
}

.pdash-panel {
  background: #1a1a2e;
  border: 1px solid #3a3a5c;
  border-radius: 16px;
  overflow: hidden;
}

.pdash-panel.hidden {
  display: none;
}

.pdash-section {
  padding: 20px;
}

.pdash-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #ddd;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdash-count {
  font-size: 11px;
  color: #888;
  background: #252540;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.pdash-section-sub {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
  line-height: 1.5;
}

.pdash-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.pdash-input {
  flex: 1;
  background: #252540;
  border: 1px solid #3a3a5c;
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}

.pdash-input:focus {
  border-color: #ffd700;
}

.pdash-add-btn {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #ffd700;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.pdash-add-btn:hover {
  background: #ffd700;
  color: #1a1a2e;
}

.saved-emails-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-email-item {
  background: #252540;
  border: 1px solid #3a3a5c;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.saved-email-addr {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  word-break: break-all;
  flex: 1;
}

.saved-email-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.se-use-btn {
  background: rgba(0, 208, 156, 0.15);
  border: 1px solid rgba(0, 208, 156, 0.3);
  color: #00d09c;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.se-use-btn:hover {
  background: #00d09c;
  color: #1a1a2e;
}

.se-del-btn {
  background: transparent;
  border: 1px solid #3a3a5c;
  color: #666;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.se-del-btn:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

/* Small ✕ remove button (replaces 🗑️ delete) */
.se-rm-btn {
  background: transparent;
  border: 1px solid rgba(255,107,107,0.2);
  color: #666;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.se-rm-btn:hover {
  background: rgba(255,107,107,0.12);
  border-color: rgba(255,107,107,0.5);
  color: #ff6b6b;
}

.se-rm-btn:active { transform: scale(0.94); }

.pdash-loading {
  color: #666;
  font-size: 13px;
  text-align: center;
  padding: 16px 0;
}

.apikey-display {
  background: #252540;
  border: 1px solid #3a3a5c;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.apikey-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #00d09c;
  flex: 1;
  word-break: break-all;
}

.apikey-copy-btn {
  background: #1a1a2e;
  border: 1px solid #3a3a5c;
  color: #aaa;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.apikey-copy-btn:hover {
  border-color: #00d09c;
  color: #00d09c;
}

.apikey-none {
  color: #666;
  font-size: 13px;
}

.pdash-gen-btn {
  background: #252540;
  border: 1px solid #3a3a5c;
  color: #aaa;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.pdash-gen-btn:hover {
  border-color: #00d09c;
  color: #00d09c;
}

/* ===== Premium button: show "Manage" for logged-in premium ===== */
.premium-btn.is-premium {
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  animation: none;
}

/* ===== Mobile fixes for new elements ===== */
@media (max-width: 600px) {
  .auth-status-text {
    display: none;
  }

  /* Hide sign-in / account button from the header on mobile — it moves below the email area */
  .auth-action-btn {
    display: none !important;
  }

  .pdash-add-row {
    flex-direction: column;
  }

  .pdash-add-btn {
    width: 100%;
  }

  .saved-email-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .saved-email-actions {
    width: 100%;
  }

  .se-use-btn, .se-del-btn, .se-rm-btn {
    flex: 1;
    text-align: center;
  }

  .premium-dashboard {
    padding: 0 0 30px;
  }

  /* Premium preview modal — compact on mobile */
  .pv-box {
    padding: 24px 18px 20px;
    border-radius: 16px;
  }

  .pv-title { font-size: 19px; }
}

/* ===================================================
   PREMIUM PREVIEW MODAL (index.html)
   =================================================== */
.pv-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  /* On close: fade out opacity first, then hide visibility */
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.pv-overlay.show {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
  /* On open: show visibility immediately, then fade in opacity */
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.pv-box {
  background: #14142a;
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 20px;
  padding: 32px 28px 28px;
  max-width: 420px;
  width: 100%;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,215,0,0.08);
  /* animation triggered only when overlay is visible */
}

/* Run slide-up animation only when overlay is opened */
.pv-overlay.show .pv-box {
  animation: pvSlideUp 0.35s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes pvSlideUp {
  from { opacity: 0; transform: translateY(28px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes overlayFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.pv-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #888;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.pv-close:hover { background: rgba(255,107,107,0.15); border-color: #ff6b6b; color: #ff6b6b; }

.pv-header { margin-bottom: 20px; }

.pv-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: #ffd700;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.pv-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
}

.pv-gold {
  background: linear-gradient(to right, #ffd700, #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pv-sub {
  color: #8b8baf;
  font-size: 13px;
  line-height: 1.5;
}

/* Feature list */
.pv-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.pv-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px 14px;
}

.pv-ico {
  font-size: 22px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.pv-list li div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pv-list li strong {
  font-size: 13px;
  color: #eee;
  font-weight: 600;
}

.pv-list li span {
  font-size: 11px;
  color: #666;
}

/* Pricing row — styles moved to new .pv-price-option section below */

.pv-save {
  background: rgba(0,208,156,0.15);
  color: #00d09c;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

/* CTA Button */
.pv-cta {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  color: #1a1a2e;
  text-decoration: none;
  text-align: center;
  padding: 15px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(255,215,0,0.35);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.pv-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,215,0,0.5);
}

.pv-cta:active { transform: scale(0.98); }

.pv-note {
  text-align: center;
  color: #555;
  font-size: 11px;
  line-height: 1.4;
}

/* ===== Profile Modal ===== */
/* Hidden by default via display:none — browser-native, works without CSS loaded */
.profile-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  z-index: 1100;
}
/* Both .show and .hiding need display:flex so the modal stays visible during close animation */
.profile-modal.show,
.profile-modal.hiding {
  display: flex;
}
.profile-modal.show {
  animation: overlayFadeIn 0.25s ease both;
}
.profile-modal.hiding {
  animation: overlayFadeOut 0.2s ease both;
}
.profile-content {
  background: #14142a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 0;
  max-width: 420px;
  width: 100%;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}

.profile-modal.show .profile-content {
  animation: pvSlideUp 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.confirm-modal.show .confirm-box {
  animation: pvSlideUp 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.profile-header h2 { font-size: 18px; font-weight: 700; }
.profile-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #aaa;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.profile-close:hover { background: rgba(255,107,107,0.15); border-color: #ff6b6b; color: #ff6b6b; }
.profile-body { padding: 24px; }
.profile-loading { color: #666; text-align: center; padding: 20px 0; font-size: 14px; }
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.profile-big-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d09c, #007a5e);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.profile-big-avatar.premium {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
}
.profile-username { font-size: 20px; font-weight: 700; }
.profile-plan-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,208,156,0.1);
  border: 1px solid rgba(0,208,156,0.3);
  color: #00d09c;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  margin-top: 4px;
}
.profile-plan-badge.premium {
  background: rgba(255,215,0,0.1);
  border-color: rgba(255,215,0,0.3);
  color: #ffd700;
}
.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.profile-info-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 14px;
}
.profile-info-label { font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.profile-info-value { font-size: 15px; font-weight: 600; color: #fff; }
.profile-info-value.green { color: #00d09c; }
.profile-info-value.gold { color: #ffd700; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.profile-action-btn {
  flex: 1;
  min-width: 120px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ccc;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.profile-action-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.profile-action-btn.danger { border-color: rgba(255,107,107,0.3); color: #ff6b6b; }
.profile-action-btn.danger:hover { background: rgba(255,107,107,0.1); }

/* ===== Permanent Email Input ===== */
.perm-email-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  background: #1e1e36;
  border: 1px solid #3a3a5c;
  border-radius: 10px;
  overflow: hidden;
}
.perm-username-field {
  flex: 1;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  margin-bottom: 0 !important;
}
.perm-domain-label {
  color: #00d09c;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  padding: 0 12px;
  flex-shrink: 0;
}
.pdash-perm-error {
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 6px;
}
.pdash-perm-error.hidden { display: none; }

/* ===== Forwarding List ===== */
.forwarding-list { display: flex; flex-direction: column; gap: 10px; }
.forwarding-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 14px 16px;
}
.forwarding-item-addr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #00d09c;
  margin-bottom: 10px;
}
.forwarding-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.forwarding-input {
  flex: 1;
  background: #1e1e36;
  border: 1px solid #3a3a5c;
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.forwarding-input:focus { border-color: #00d09c; }
.forwarding-input::placeholder { color: #444; }
.forwarding-save-btn {
  background: rgba(0,208,156,0.1);
  border: 1px solid rgba(0,208,156,0.3);
  color: #00d09c;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.forwarding-save-btn:hover { background: rgba(0,208,156,0.2); }
.forwarding-clear-btn {
  background: rgba(255,107,107,0.08);
  border: 1px solid rgba(255,107,107,0.25);
  color: #ff6b6b;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.forwarding-clear-btn:hover { background: rgba(255,107,107,0.15); }

/* ===== Touch improvements ===== */
button,
.pdash-tab,
.pv-cta,
.auth-action-btn,
.profile-action-btn,
.se-use-btn,
.se-del-btn,
.se-rm-btn,
.pdash-add-btn,
.pdash-gen-btn,
.forwarding-save-btn,
.forwarding-clear-btn,
.apikey-copy-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.pdash-tab:active { transform: scale(0.96); }
.pdash-add-btn:active { transform: scale(0.96); }
.se-use-btn:active { transform: scale(0.96); }
.forwarding-save-btn:active { transform: scale(0.96); }
.pdash-gen-btn:active { transform: scale(0.96); }
.apikey-copy-btn:active { transform: scale(0.96); }
.profile-action-btn:active { transform: scale(0.97); }
.pv-cta:active { transform: scale(0.98); }
.premium-btn:active { transform: scale(0.97); animation: none; }
.auth-action-btn:active { transform: scale(0.96); }

/* ===== API Docs footer link ===== */
.footer-btn.api-docs {
  background: rgba(0, 208, 156, 0.12);
  color: #00d09c;
  border: 1px solid rgba(0, 208, 156, 0.3);
}
.footer-btn.api-docs:hover {
  background: rgba(0, 208, 156, 0.22);
  color: #00d09c;
}

/* ===== Premium Popup Pricing ===== */
.pv-pricing {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: stretch;
}
.pv-price-option {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.pv-price-option:not(.featured) {
  border: 2px solid #00c853;
}
.pv-price-option.featured {
  background: rgba(255,215,0,0.08);
  border-color: rgba(255,215,0,0.45);
  box-shadow: 0 0 0 1px rgba(255,215,0,0.15);
}
.pv-price-label {
  font-size: 11px;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pv-price-option.featured .pv-price-label { color: #ffd700; }
.pv-price-amount { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.1; }
.pv-price-amount strong { color: #fff; }
.pv-price-amount small { font-size: 12px; color: #666; font-weight: 400; }
.pv-price-sub { font-size: 11px; color: #00d09c; margin-top: 3px; font-weight: 600; }

/* Divider — vertical separator lines on desktop, horizontal on mobile */
.pv-price-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #555;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  padding: 0 2px;
}
.pv-price-divider::before,
.pv-price-divider::after {
  content: '';
  width: 1px;
  flex: 1;
  background: rgba(255,255,255,0.08);
}
@media (max-width: 600px) {
  .pv-pricing { flex-direction: column; }
  .pv-price-divider {
    flex-direction: row;
    gap: 10px;
    padding: 0;
  }
  .pv-price-divider::before,
  .pv-price-divider::after {
    width: auto;
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.07);
  }
}

/* ===== Sign-out Confirm Modal ===== */
/* Hidden by default via display:none — browser-native, works without CSS loaded */
.confirm-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  z-index: 100000;
}
.confirm-modal.show,
.confirm-modal.hiding {
  display: flex;
}
.confirm-modal.show {
  animation: overlayFadeIn 0.2s ease both;
}
.confirm-modal.hiding {
  animation: overlayFadeOut 0.18s ease both;
}
.confirm-box {
  background: #14142a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.confirm-icon { font-size: 44px; margin-bottom: 14px; }
.confirm-title { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.confirm-msg { font-size: 14px; color: #888; line-height: 1.5; margin-bottom: 22px; }
.confirm-actions {
  display: flex;
  gap: 10px;
}
.confirm-cancel-btn {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #ccc;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.confirm-cancel-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.confirm-cancel-btn:active { transform: scale(0.96); }
.confirm-ok-btn {
  flex: 1;
  background: rgba(0,208,156,0.15);
  border: 1px solid rgba(0,208,156,0.4);
  color: #00d09c;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.confirm-ok-btn:hover { background: rgba(0,208,156,0.25); }
.confirm-ok-btn:active { transform: scale(0.96); }
.confirm-ok-btn.danger {
  background: rgba(255,107,107,0.12);
  border-color: rgba(255,107,107,0.35);
  color: #ff6b6b;
}
.confirm-ok-btn.danger:hover { background: rgba(255,107,107,0.22); }

/* ===== Profile form sections (change password / delete account) ===== */
.profile-section {
  padding: 18px 0 0;
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.profile-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #ddd;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-section-title.danger { color: #ff6b6b; }
.profile-danger-zone { margin-top: 8px; }
.profile-danger-desc {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 12px;
}
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-form.hidden { display: none; }
.profile-input {
  width: 100%;
  background: #252540;
  border: 1px solid #3a3a5c;
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: 'Inter', sans-serif;
}
.profile-input:focus { border-color: #00d09c; }
.profile-input::placeholder { color: #444; }
.profile-form-btn {
  background: rgba(0,208,156,0.12);
  border: 1px solid rgba(0,208,156,0.35);
  color: #00d09c;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  align-self: flex-start;
}
.profile-form-btn:hover { background: rgba(0,208,156,0.22); }
.profile-form-btn:active { transform: scale(0.96); }
.profile-form-error {
  color: #ff6b6b;
  font-size: 12px;
  line-height: 1.4;
}
.profile-form-error.hidden { display: none; }

/* ===== Mobile Account Header Button (in header on mobile when logged in) ===== */
/* Hidden on desktop — desktop uses .auth-action-btn */
.mobile-account-header-btn {
  display: none;
}

@media (max-width: 600px) {
  .mobile-account-header-btn {
    background: linear-gradient(135deg, #00d09c 0%, #00b386 100%);
    border: none;
    color: #fff;
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 208, 156, 0.35);
    animation: accountPulse 2.5s ease-in-out infinite;
    will-change: box-shadow;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-account-header-btn.hidden {
    display: none !important;
  }

  .mobile-account-header-btn:hover,
  .mobile-account-header-btn:focus-visible {
    box-shadow: 0 4px 18px rgba(0, 208, 156, 0.55);
    animation: none;
  }

  .mobile-account-header-btn:active {
    transform: scale(0.96);
    animation: none;
  }
}

@keyframes accountPulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(0, 208, 156, 0.35); }
  50%       { box-shadow: 0 4px 20px rgba(0, 208, 156, 0.6); }
}

/* ===== Mobile Sign-In Row (below email area on small screens only) ===== */
/* Hidden on desktop */
.mobile-signin-row {
  display: none;
}

@media (max-width: 600px) {
  .mobile-signin-row {
    /* Transparent wrapper — button becomes a direct flex child of .mobile-actions */
    display: contents;
  }

  .mobile-signin-btn {
    background: rgba(0, 208, 156, 0.12);
    border: 1px solid rgba(0, 208, 156, 0.35);
    color: #00d09c;
    padding: 10px 22px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.2s, transform 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-signin-btn:hover,
  .mobile-signin-btn:focus-visible {
    background: rgba(0, 208, 156, 0.22);
  }

  .mobile-signin-btn:active {
    transform: scale(0.95);
  }
}


/* ===== Google Login Button ===== */
.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  margin-bottom: 12px;
}

.google-login-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Divider between Google button and email/password form */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 16px;
  color: #888;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

/* Hidden state for compose FAB — uses !important to beat CSS display:inline-flex !important */
.compose-fab--hidden {
  display: none !important;
}

/* ══════════════════════════════════════════════════
   COMPOSE FAB — fixed bottom-right, Gmail-style
══════════════════════════════════════════════════ */
.compose-fab {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 1050 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px;
  padding: 0 20px 0 16px;
  height: 52px;
  background: linear-gradient(135deg, #00d09c 0%, #00a87a 100%);
  color: #000;
  border: none;
  border-radius: 26px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,208,156,0.55), 0 2px 8px rgba(0,0,0,0.45);
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  float: none !important;
  margin: 0 !important;
  max-width: none !important;
  width: auto !important;
  /* Ensure it's always above everything */
  isolation: isolate;
}
.compose-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 28px rgba(0,208,156,0.6), 0 4px 12px rgba(0,0,0,0.4);
}
.compose-fab:active { transform: scale(0.95); }
.compose-fab-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.compose-fab-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
/* Mobile ≤480px: icon-only circle */
@media (max-width: 480px) {
  .compose-fab {
    position: fixed !important;
    padding: 0 !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    justify-content: center !important;
    align-items: center !important;
    bottom: 20px !important;
    right: 16px !important;
    gap: 0 !important;
  }
  .compose-fab-label { display: none !important; }
}

/* ══════════════════════════════════════════════════
   COMPOSE WINDOW — bottom-right panel, inspired by
   auth-modal / profile-modal / pv-box design language
══════════════════════════════════════════════════ */
.compose-window {
  display: none;
  position: fixed !important;
  bottom: 0 !important;
  right: 24px !important;
  z-index: 1040 !important;
  width: 460px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: 92vh;
  /* Same glass-dark background as auth-content / profile-content */
  background: rgba(20, 20, 42, 0.97) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  /* Rounded top corners matching pv-box / about-content */
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: none;
  box-shadow: 0 -20px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
  flex-direction: column;
  overflow: hidden;
  float: none !important;
  margin: 0 !important;
  padding: 0;
  color: #e0e0f0;
  font-family: inherit;
  font-size: 14px;
}
/* JS adds .show + style.display='flex' */
.compose-window.show {
  display: flex !important;
  animation: cwSlideUp 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
/* Match pvSlideUp family */
@keyframes cwSlideUp {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
/* Minimized = only header visible */
.compose-window.minimized .cw-body,
.compose-window.minimized .cw-footer { display: none !important; }
/* Also hide the drag-handle pill when minimized */
.compose-window.minimized > div:first-child { display: none !important; }
/* Fullscreen */
.compose-window.fullscreen {
  right: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
}
/* Mobile: full-width bottom sheet */
@media (max-width: 560px) {
  .compose-window, .compose-window.show {
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    border-radius: 20px 20px 0 0 !important;
  }
}

/* ── Header — matches auth-header / profile-header pattern ── */
.cw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 16px 20px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  cursor: grab;
  user-select: none;
  /* Subtle green accent line at top like a card */
  background: linear-gradient(180deg, rgba(0,208,156,0.06) 0%, transparent 100%);
  transition: background 0.2s;
}
.cw-header:hover { background: linear-gradient(180deg, rgba(0,208,156,0.10) 0%, rgba(255,255,255,0.02) 100%); }
/* Mobile: no grab cursor (no drag on touch screens) */
@media (max-width: 560px) { .cw-header { cursor: pointer; } }
.cw-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cw-title::before {
  content: '✏️';
  font-size: 15px;
}
/* Controls — match auth-close / profile-close button style */
.cw-controls { display: flex; align-items: center; gap: 6px; }
.cw-ctrl-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.cw-ctrl-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); color: #ddd; }
.cw-ctrl-close:hover { background: rgba(255,107,107,0.15); border-color: #ff6b6b; color: #ff6b6b; }

/* Dragging state: unpin from bottom/right so JS can move via top/left */
.compose-window.dragging {
  bottom: unset !important;
  right: unset !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.85), 0 0 0 1px rgba(0,208,156,0.15) !important;
}

/* ── Premium custom-from inside the From row ── */
.cw-custom-from {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 4px;
  min-width: 0;
}
.cw-custom-username {
  background: transparent;
  border: none;
  outline: none;
  color: #e0e0f0;
  font-size: 13px;
  font-family: inherit;
  min-width: 0;
  flex: 1;
  padding: 2px 0;
}
.cw-custom-username::placeholder { color: #444; }
.cw-custom-domain {
  color: #00d09c;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.cw-custom-from-btn {
  background: none;
  border: none;
  font-size: 13px;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 6px;
  opacity: 0.55;
  transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.cw-custom-from-btn:hover { opacity: 1; background: rgba(0,208,156,0.12); }
.cw-custom-from-btn.hidden { display: none; }

/* ── Body / Fields — matches auth-body padding, auth-input style ── */
.cw-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  background: transparent;
  padding: 12px 16px 4px;
  gap: 8px;
}
/* Each field is a pill row like auth-input */
.cw-field {
  display: flex;
  align-items: center;
  background: #131320;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0 14px;
  min-height: 42px;
  flex-shrink: 0;
  gap: 10px;
  transition: border-color 0.2s;
}
.cw-field:focus-within {
  border-color: #00d09c;
}
.cw-field-label {
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 38px;
  flex-shrink: 0;
}
.cw-select {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ccc;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  padding: 2px 0;
}
.cw-select option { background: #14142a; color: #e0e0f0; }
.cw-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e0e0f0;
  font-size: 13.5px;
  font-family: inherit;
  padding: 2px 0;
  min-width: 0;
}
.cw-input::placeholder { color: #444; }
/* Subject row — slightly taller with bolder text */
.cw-field-subject { min-height: 46px; }
.cw-subject-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 2px 0;
  width: 100%;
}
.cw-subject-input::placeholder { color: #3a3a55; font-weight: 400; }

/* ── Editor area ── */
.cw-editor-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  background: #131320;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.cw-editor-wrap:focus-within { border-color: #00d09c; }
.cw-editor {
  min-height: 100%;
  padding: 12px 14px 8px;
  color: #d0d0e8;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
  font-family: inherit;
  word-break: break-word;
}
.cw-editor:empty::before {
  content: attr(data-placeholder);
  color: #383855;
  pointer-events: none;
  display: block;
}
.cw-editor a { color: #00d09c; }
.cw-textarea {
  width: 100%;
  height: 100%;
  min-height: 120px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  outline: none;
  color: #d0d0e8;
  font-size: 13.5px;
  line-height: 1.65;
  resize: none;
  font-family: 'Courier New', monospace;
  box-sizing: border-box;
}

/* ── Error ── */
.cw-error {
  margin: 0 0 4px;
  padding: 8px 12px;
  background: rgba(255,70,70,0.1);
  border: 1px solid rgba(255,70,70,0.25);
  border-radius: 8px;
  color: #ff8888;
  font-size: 12.5px;
  flex-shrink: 0;
}

/* ── Footer — matches auth-body bottom area ── */
.cw-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  background: rgba(10,10,24,0.5);
  flex-shrink: 0;
  flex-wrap: nowrap;
}
/* Send button — full gradient like auth-send-btn */
.cw-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #00d09c, #00a87a);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,208,156,0.35);
  transition: box-shadow 0.2s, transform 0.15s, opacity 0.15s;
}
.cw-send-btn:hover {
  box-shadow: 0 6px 20px rgba(0,208,156,0.5);
  transform: translateY(-1px);
}
.cw-send-btn:active { transform: scale(0.96); box-shadow: none; }
.cw-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
/* Toolbar */
.cw-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.cw-tool {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.cw-tool:hover { background: rgba(255,255,255,0.08); color: #bbb; }
.cw-tool:active { background: rgba(255,255,255,0.14); color: #fff; }
.cw-tool-sep {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.08);
  margin: 0 3px;
  flex-shrink: 0;
}
.cw-mode-toggle {
  width: auto;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #00d09c;
  letter-spacing: 0.05em;
  border: 1px solid rgba(0,208,156,0.25);
  background: rgba(0,208,156,0.07);
}
.cw-mode-toggle:hover { background: rgba(0,208,156,0.15); border-color: rgba(0,208,156,0.4); }
.cw-ratelimit {
  font-size: 10.5px;
  color: #4a4a70;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
}

/* ── Between-row: attachment button + rate limit ── */
.cw-between-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 4px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.cw-attach-btn-big {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(0,208,156,0.12), rgba(0,136,204,0.1));
  border: 1px solid rgba(0,208,156,0.35);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #00d09c;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  user-select: none;
}
.cw-attach-btn-big:hover {
  background: linear-gradient(135deg, rgba(0,208,156,0.2), rgba(0,136,204,0.16));
  border-color: rgba(0,208,156,0.6);
  transform: translateY(-1px);
}
.cw-attach-btn-big:active { transform: scale(0.97); }
.cw-attach-btn-big svg { flex-shrink: 0; }

/* ── Attachment chips ── */
.cw-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 4px;
  flex-shrink: 0;
}
.cw-attach-list.hidden { display: none; }
.cw-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,208,156,0.08);
  border: 1px solid rgba(0,208,156,0.22);
  border-radius: 20px;
  padding: 3px 8px 3px 10px;
  font-size: 11.5px;
  color: #bbb;
  max-width: 220px;
  min-width: 0;
  transition: border-color 0.15s;
}
.cw-attach-chip:hover { border-color: rgba(0,208,156,0.45); }
.cw-attach-icon { font-size: 12px; flex-shrink: 0; }
.cw-attach-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.cw-attach-size { color: #555; font-size: 10px; flex-shrink: 0; }
.cw-attach-remove {
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  font-size: 11px;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.12s;
}
.cw-attach-remove:hover { color: #ff6b6b; }

/* ══════════════════════════════════════════════════
   SENT BOX — "curry bubble" glass-card design
══════════════════════════════════════════════════ */
.sent-box-wrapper {
  margin-top: 20px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  background: rgba(12, 12, 26, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
}
.sent-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  transition: background 0.18s;
  user-select: none;
  background: linear-gradient(135deg, rgba(0,208,156,0.09) 0%, rgba(0,168,122,0.04) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sent-box-header:hover {
  background: linear-gradient(135deg, rgba(0,208,156,0.14) 0%, rgba(0,168,122,0.07) 100%);
}
.sent-count-badge {
  background: linear-gradient(135deg, #00d09c, #00a87a);
  color: #000;
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 800;
  margin-left: 8px;
  box-shadow: 0 2px 8px rgba(0,208,156,0.45);
}
.sent-box-toggle { font-size: 14px; color: #00d09c; transition: transform 0.2s; }

/* ── Bubble rows ── */
.sent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 10px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  gap: 12px;
}
.sent-row:hover {
  background: rgba(0,208,156,0.07);
  border-color: rgba(0,208,156,0.22);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.sent-row:first-child { margin-top: 10px; }
.sent-row:last-child  { margin-bottom: 10px; }
.sent-row-main { flex: 1; min-width: 0; }
.sent-to {
  font-size: 11.5px;
  color: #666;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sent-subject {
  font-size: 13.5px;
  font-weight: 600;
  color: #e8e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sent-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.sent-opened-badge {
  font-size: 11px;
  background: rgba(0,208,156,0.15);
  color: #00d09c;
  border-radius: 10px;
  padding: 3px 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0 8px rgba(0,208,156,0.2);
}
.sent-unopened-badge {
  font-size: 10.5px;
  color: #484860;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.sent-date { font-size: 10.5px; color: #484860; }
.sent-body-preview {
  font-size: 11px;
  color: #555;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.sent-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 3px 5px;
  border-radius: 8px;
  opacity: 0.4;
  transition: opacity 0.15s, background 0.15s;
  line-height: 1;
}
.sent-delete-btn:hover {
  opacity: 1;
  background: rgba(255, 80, 80, 0.15);
}
.sent-empty {
  padding: 28px 20px;
  text-align: center;
  color: #484860;
  font-size: 13px;
}

/* Sent email body in modal */
.sent-email-body-section {
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 16px;
}
.sent-email-body-section h4 {
  font-size: 11px;
  font-weight: 700;
  color: #00d09c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}
.sent-email-iframe {
  width: 100%;
  min-height: 200px;
  max-height: 400px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: #0a0a14;
}
.sent-email-plaintext {
  background: #07070f;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: #c0c0d8;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
  max-height: 340px;
  overflow-y: auto;
  font-family: 'Segoe UI Emoji','Apple Color Emoji',Arial,sans-serif;
  margin: 0;
}

/* ══════════════════════════════════════════════════
   SENT ANALYTICS CARD — advanced black theme
══════════════════════════════════════════════════ */
.sent-analytics-card {
  background: #060610;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 20px 18px 16px;
  margin-bottom: 16px;
}
.sent-analytics-card h4 {
  font-size: 10.5px;
  font-weight: 800;
  color: #00d09c;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sent-analytics-card h4::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  background: linear-gradient(#00d09c, #00a87a);
  border-radius: 2px;
}
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.analytics-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.analytics-item {
  background: #0c0c1c;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 16px 12px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.analytics-item:hover {
  border-color: rgba(0,208,156,0.18);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
/* Accent top bar on each stat tile */
.analytics-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00d09c 0%, #00a87a 100%);
  border-radius: 2px 2px 0 0;
  opacity: 0.5;
}
.analytics-value {
  font-size: 22px;
  font-weight: 800;
  color: #d0d0e0;
  margin-bottom: 6px;
  word-break: break-all;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.analytics-value.green {
  color: #00d09c;
  text-shadow: 0 0 18px rgba(0,208,156,0.35);
}
.analytics-label {
  font-size: 9.5px;
  color: #484860;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.open-history { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.open-history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #777;
  padding: 10px 12px;
  background: #0c0c1c;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.05);
}
.ohi-index {
  font-size: 10px;
  font-weight: 800;
  color: #00d09c;
  min-width: 20px;
  padding-top: 1px;
}
.ohi-details { flex: 1; }
.ohi-time { font-size: 11px; color: #aaa; margin-bottom: 4px; }
.ohi-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.ohi-flag, .ohi-ip, .ohi-ua {
  font-size: 11px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(255,255,255,0.06);
  color: #888;
}
.sent-analytics-section-title {
  font-size: 11px;
  font-weight: 800;
  color: #00d09c;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 16px 0 8px;
}

/* ══════════════════════════════════════════════════
   SENT MAIL META CARD — shown above body in sent email modal
══════════════════════════════════════════════════ */
.sent-mail-meta-card {
  background: #07070f;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.smm-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
}
.smm-label {
  font-size: 10px;
  font-weight: 800;
  color: #00d09c;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  width: 38px;
}
.smm-value {
  color: #c8c8dc;
  word-break: break-all;
  line-height: 1.4;
}

/* ── Sent row: from + to labels ── */
.sent-from-to {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 3px;
}
.sent-from-label {
  font-size: 10.5px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sent-to-label {
  font-size: 10.5px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════
   MOBILE COMPOSE — safe-area + smart positioning
══════════════════════════════════════════════════ */
@media (max-width: 560px) {
  .compose-window, .compose-window.show {
    /* Push the bottom-sheet up from the very bottom edge on notched phones */
    padding-bottom: env(safe-area-inset-bottom, 0px);
    /* Cap height to leave a peek of content above on short phones */
    max-height: 88vh !important;
  }
  /* When compose is open, FAB is hidden via JS — no additional CSS needed */
}

/* ══════════════════════════════════════════════════
   INBOX HEADER — centered bold "INBOX" title
══════════════════════════════════════════════════ */
.inbox-header-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
  text-align: center;
}

/* ══════════════════════════════════════════════════
   ACCOUNT BUTTON — btn-avatar / btn-username classes
   (used by initAuthState to populate auth-action-btn)
══════════════════════════════════════════════════ */
.btn-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.btn-avatar-initial {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d09c, #0088cc);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0;
}
.btn-username {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

/* free: green border accent */
.auth-action-btn.user-free {
  border-color: rgba(0, 208, 156, 0.45);
  color: #00d09c;
  padding: 6px 14px;
  max-width: 170px;
}
/* premium: gold border accent */
.auth-action-btn.user-premium {
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd700;
  padding: 6px 14px;
  max-width: 170px;
}
.auth-action-btn.user-premium .btn-avatar-initial {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a1a2e;
}
.auth-action-btn.user-free:hover,
.auth-action-btn.user-premium:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════
   PROFILE — avatar upload wrap
══════════════════════════════════════════════════ */
.profile-big-avatar-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-big-avatar-wrap:hover .profile-avatar-upload-overlay { opacity: 1; }
.profile-big-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.profile-avatar-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.profile-big-avatar-wrap .profile-big-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #00d09c, #0088cc);
  color: #fff;
  user-select: none;
}
.profile-big-avatar-wrap .profile-big-avatar.premium {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a1a2e;
}

/* ══════════════════════════════════════════════════
   PROFILE — verification nudge banner
══════════════════════════════════════════════════ */
.profile-verify-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(255,165,0,0.1) 0%, rgba(255,100,0,0.08) 100%);
  border: 1px solid rgba(255,165,0,0.25);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.pvb-icon { font-size: 22px; flex-shrink: 0; line-height: 1; }
.pvb-content { flex: 1; min-width: 0; }
.pvb-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffb347;
  margin-bottom: 5px;
}
.pvb-desc {
  font-size: 12.5px;
  color: #9090b0;
  line-height: 1.55;
  margin-bottom: 10px;
}
.pvb-desc strong { color: #ff7070; }
.pvb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pvb-btn-google {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #e8e8f0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
}
.pvb-btn-google:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}
.pvb-btn-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,208,156,0.1);
  border: 1px solid rgba(0,208,156,0.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #00d09c;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}
.pvb-btn-email:hover { background: rgba(0,208,156,0.18); }

/* ══════════════════════════════════════════════════
   PROFILE — email status row (when email present)
══════════════════════════════════════════════════ */
.profile-email-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 9px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: #888;
}
.pes-icon { font-size: 15px; flex-shrink: 0; }
.pes-text { flex: 1; }
.pes-text strong { color: #c0c0d8; }
.pes-verify-btn {
  background: rgba(255,165,0,0.1);
  border: 1px solid rgba(255,165,0,0.3);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #ffb347;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.2s;
}
.pes-verify-btn:hover { background: rgba(255,165,0,0.2); }

/* ══════════════════════════════════════════════════
   SENT MAIL VIEW — source toggle + action row
══════════════════════════════════════════════════ */
.sent-view-wrap { display: flex; flex-direction: column; gap: 0; }
.sent-email-body-section { margin-top: 16px; }
.sent-body-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.sent-body-toolbar h4 {
  font-size: 11px;
  font-weight: 700;
  color: #00d09c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}
.sent-source-toggle-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sent-source-toggle-btn:hover {
  background: rgba(0,208,156,0.08);
  border-color: rgba(0,208,156,0.25);
  color: #00d09c;
}
/* Dark iframe for sent HTML content */
.sent-email-iframe-dark {
  width: 100%;
  min-height: 200px;
  max-height: 420px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: #0a0a14;
}
/* Raw source pre-formatted block */
.sent-email-source-view {
  background: #07070f;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12px;
  color: #9090b0;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 380px;
  overflow-y: auto;
  margin: 0;
  line-height: 1.6;
}
/* Bottom actions row in sent view */
.sent-view-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sent-view-delete-btn {
  background: rgba(255,70,70,0.08);
  border: 1px solid rgba(255,70,70,0.25);
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ff8888;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.sent-view-delete-btn:hover {
  background: rgba(255,70,70,0.15);
  border-color: rgba(255,70,70,0.4);
}

/* ===== Compose: Attachment preview strip ===== */
.cw-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,208,156,0.03);
}
.cw-attachments.hidden { display: none; }
.cw-att-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 4px 10px 4px 6px;
    font-size: 12px;
    color: #ccc;
    max-width: 200px;
}
.cw-att-thumb {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
.cw-att-icon { font-size: 14px; flex-shrink: 0; }
.cw-att-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}
.cw-att-size { color: #666; font-size: 10px; flex-shrink: 0; }
.cw-att-remove {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 2px;
}
.cw-att-remove:hover { color: #ff6b6b; }

/* ===== Inbox: Attachment status indicators ===== */
.att-status-processing {
    color: #666;
    font-size: 11px;
    font-style: italic;
}
.att-status-processing::before { content: '⏳ '; }
.att-status-ready::before { content: '📎 '; }
.att-status-failed {
    color: #ff6b6b;
    font-size: 11px;
}
.att-status-failed::before { content: '❌ '; }
