/* ==========================================================================
   KD Temp Mail — Modern Glassmorphism & Cyber-Clean Dark Theme
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette */
  --bg-base: #07090e;
  --bg-surface: rgba(16, 21, 34, 0.72);
  --bg-surface-elevated: rgba(22, 29, 48, 0.85);
  --bg-card: rgba(19, 26, 44, 0.65);
  --bg-hover: rgba(33, 44, 72, 0.5);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-active: rgba(6, 182, 212, 0.6);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Accents */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.25);
  
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.25);
  --danger-bg: rgba(239, 68, 68, 0.12);

  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-subtle);
  --shadow-elevated: 0 20px 45px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
  --blur-glass: blur(20px);
  --transition-fast: 160ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Ambient Background Glows */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  opacity: 0.35;
}

.glow-top-left {
  width: 500px;
  height: 500px;
  top: -100px;
  left: -100px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
}

.glow-top-right {
  width: 450px;
  height: 450px;
  top: -50px;
  right: -80px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
}

.glow-bottom-center {
  width: 600px;
  height: 600px;
  bottom: -200px;
  left: 30%;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  opacity: 0.2;
}

/* App Wrapper */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 8px;
}

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

.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px var(--primary-glow);
  position: relative;
}

.logo-letters {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 70%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
}

.brand-tagline {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header-telegram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 158, 217, 0.12);
  border: 1px solid rgba(34, 158, 217, 0.35);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  backdrop-filter: var(--blur-glass);
}

.btn-header-telegram:hover {
  background: rgba(34, 158, 217, 0.22);
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(34, 158, 217, 0.25);
}

.tg-svg {
  color: #38bdf8;
  flex-shrink: 0;
}

.tg-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  transition: background var(--transition-normal);
}

.tg-status-dot.active {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.tg-status-dot.inactive {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  backdrop-filter: var(--blur-glass);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.status-indicator.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulseStatus 2s infinite ease-in-out;
}

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

.status-label {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.2px;
}

/* ==========================================================================
   Hero Card & Active Address Box
   ========================================================================== */
.inbox-hero-card {
  background: var(--bg-surface);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  transition: border-color var(--transition-smooth);
}

.inbox-hero-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

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

.hero-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #818cf8;
}

.auto-refresh-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: #c7d2fe;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.auto-refresh-pill:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulseDot 1.5s infinite;
}

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

/* Domain Selector Bar */
.domain-selector-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(12, 17, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.domain-selector-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  white-space: nowrap;
}

.domain-selector-label svg {
  color: var(--cyan);
}

.domain-pills-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.domain-pill:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.domain-pill.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28) 0%, rgba(6, 182, 212, 0.28) 100%);
  border-color: var(--cyan);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.3);
}

.domain-pill .domain-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all var(--transition-fast);
}

.domain-pill.active .domain-dot {
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

.domain-pill .domain-check {
  font-size: 11px;
  font-weight: 800;
  color: var(--cyan);
  margin-left: 2px;
}

.address-display-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.address-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(8, 12, 22, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.address-box:hover {
  background: rgba(12, 18, 32, 0.85);
  border-color: var(--border-focus);
  box-shadow: 0 0 20px var(--primary-glow);
}

.mail-icon {
  color: var(--cyan);
  flex-shrink: 0;
}

.current-address {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  word-break: break-all;
  letter-spacing: -0.3px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

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

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7175f5 0%, #5952f0 100%);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--success-glow);
}

.btn-success:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.btn-accent {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
}

.btn-danger-outline {
  background: var(--danger-bg);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.btn-danger-outline:hover {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
  box-shadow: 0 4px 14px var(--danger-glow);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

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

.inbox-selector-wrap {
  flex: 1;
  min-width: 220px;
}

.inbox-selector-wrap select {
  width: 100%;
  padding: 10px 16px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: var(--font-mono);
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.inbox-selector-wrap select:focus,
.inbox-selector-wrap select:hover {
  border-color: var(--border-focus);
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.spin-icon.spinning {
  animation: spin 700ms linear infinite;
}

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

/* ==========================================================================
   New Inbox Panel (Collapsible)
   ========================================================================== */
.new-inbox-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  animation: expandPanel 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.new-inbox-panel.hidden {
  display: none;
}

@keyframes expandPanel {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.creator-inputs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.input-with-domain {
  flex: 1;
  min-width: 260px;
  display: flex;
  background: rgba(8, 12, 22, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.input-with-domain:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-with-domain input {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.input-with-domain input::placeholder {
  color: var(--text-dim);
}

.domain-picker {
  background: rgba(22, 29, 48, 0.7);
  border: none;
  border-left: 1px solid var(--border-subtle);
  color: #a5b4fc;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 0 14px;
  cursor: pointer;
  outline: none;
}

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

/* ==========================================================================
   Messages Section
   ========================================================================== */
.messages-container {
  background: var(--bg-surface);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.messages-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
}

.messages-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.messages-heading {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.4px;
}

.badge-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(99, 102, 241, 0.25);
  letter-spacing: 0.3px;
}

.live-status-ping {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ping-circle {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pingAnimation 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

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

.ping-text {
  font-size: 12px;
  color: var(--text-dim);
}

/* Message Feed List */
.message-feed {
  min-height: 280px;
}

.message-card {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  position: relative;
}

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

.message-card:hover {
  background: var(--bg-hover);
}

.sender-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(6, 182, 212, 0.3) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: #c7d2fe;
  flex-shrink: 0;
}

.message-preview-content {
  flex: 1;
  min-width: 0;
}

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

.sender-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.received-time {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  margin-left: 12px;
}

.message-subject {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 5px;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-snippet {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.empty-radar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
}

.empty-radar::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--primary);
  animation: ripple 2s infinite ease-out;
}

@keyframes ripple {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0; }
}

.radar-icon {
  font-size: 28px;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 360px;
  line-height: 1.6;
}

/* ==========================================================================
   Message Detail Modal / Reader Drawer
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 200ms ease-out;
}

.modal-backdrop.hidden {
  display: none;
}

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

.modal-card {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScale 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-subject-wrap {
  flex: 1;
  padding-right: 16px;
}

.modal-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cyan);
  letter-spacing: 0.8px;
  display: inline-block;
  margin-bottom: 4px;
}

.modal-subject {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--bg-hover);
  color: #ffffff;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 14px 24px;
  background: rgba(10, 14, 26, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 13px;
  color: #e2e8f0;
  word-break: break-all;
}

.font-mono {
  font-family: var(--font-mono);
}

/* OTP Banner */
.otp-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.3);
  padding: 12px 24px;
}

.otp-banner.hidden {
  display: none;
}

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

.otp-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.otp-code {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 2px;
}

/* View Tabs */
.view-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 24px;
  background: rgba(8, 12, 22, 0.5);
  border-bottom: 1px solid var(--border-subtle);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  background: var(--bg-hover);
  color: #ffffff;
}

/* Modal Content */
.modal-content-area {
  flex: 1;
  overflow: auto;
  min-height: 280px;
  background: #ffffff;
  position: relative;
}

.email-frame {
  width: 100%;
  height: 380px;
  border: none;
  background: #ffffff;
}

.modal-text-content {
  padding: 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: #1e293b;
  line-height: 1.7;
  white-space: pre-wrap;
  background: #f8fafc;
  min-height: 380px;
}

.modal-text-content.hidden {
  display: none;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-hub {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-surface-elevated);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  animation: toastSlideIn 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.fadeout {
  animation: toastSlideOut 180ms ease-in forwards;
}

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

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

/* ==========================================================================
   Footer & Accessibility
   ========================================================================== */
.app-footer {
  text-align: center;
  margin-top: 36px;
  font-size: 12px;
  color: var(--text-dim);
}

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

.sep {
  opacity: 0.3;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   Telegram Modal Styles
   ========================================================================== */
.telegram-modal-card {
  max-width: 580px;
}

.tg-tag {
  background: rgba(34, 158, 217, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(34, 158, 217, 0.3) !important;
}

.telegram-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 65vh;
  overflow-y: auto;
}

.tg-status-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.tg-status-banner.active {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.tg-status-banner.inactive {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.06);
}

.tg-status-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 158, 217, 0.15);
  color: #38bdf8;
  flex-shrink: 0;
}

.tg-status-banner.active .tg-status-icon-wrap {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.tg-status-banner.inactive .tg-status-icon-wrap {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.tg-status-heading {
  font-weight: 700;
  font-size: 15px;
  color: #f8fafc;
  margin-bottom: 2px;
}

.tg-status-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.tg-feature-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tg-feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.tg-card-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.tg-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 4px;
}

.tg-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.tg-setup-guide {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.tg-setup-guide h4 {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.tg-steps {
  margin: 0;
  padding-left: 20px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.tg-steps li {
  margin-bottom: 8px;
}

.tg-steps code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.tg-steps pre {
  margin: 6px 0 0;
  background: #090d16;
  padding: 10px 12px;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
}

.tg-steps pre code {
  background: transparent;
  padding: 0;
  color: #a5b4fc;
}

.btn-telegram-test {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-telegram-test:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
  transform: translateY(-1px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 680px) {
  .app-wrapper {
    padding: 20px 12px 60px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .brand-title {
    font-size: 24px;
  }

  .address-display-row {
    flex-direction: column;
  }

  .hero-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }

  .creator-inputs {
    flex-direction: column;
  }

  .creator-actions {
    flex-direction: column;
  }

  .modal-card {
    max-height: 96vh;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 16px;
  }

  .modal-meta-grid {
    padding: 12px 16px;
  }

  .modal-footer {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
}
