/* ==========================================================================
   AXIOM WEB DASHBOARD — APPLE DESIGN SYSTEM
   Principles: Latency elimination, spring physics, translucent materials,
   optical hierarchy, restrained palette, spatial consistency.
   ========================================================================== */

:root {
  /* Apple System Palette (Dark Mode First) */
  --bg-black: #000000;
  --bg-primary: #0a0a0c;
  --bg-card: rgba(22, 22, 26, 0.72);
  --bg-card-hover: rgba(30, 30, 36, 0.82);
  --bg-card-active: rgba(38, 38, 44, 0.92);
  --bg-secondary: rgba(44, 44, 48, 0.5);

  /* Borders & Specular Highlights */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(10, 132, 255, 0.6);
  --specular-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
  --specular-highlight-bold: inset 0 1px 0 0 rgba(255, 255, 255, 0.22);

  /* Apple System Accent Colors */
  --apple-blue: #0a84ff;
  --apple-blue-hover: #0071e3;
  --apple-mint: #30d158;
  --apple-mint-glow: rgba(48, 209, 88, 0.25);
  --apple-orange: #ff9f0a;
  --apple-red: #ff453a;
  --apple-red-glow: rgba(255, 69, 58, 0.28);
  --apple-purple: #bf5af2;
  --apple-cyan: #64d2ff;

  /* Typography Colors */
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary: #636366;
  --text-disabled: #48484a;

  /* Fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "SF Pro Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Spring Physics / Transitions */
  --spring-snappy: 350ms cubic-bezier(0.2, 0.9, 0.3, 1);
  --spring-press: 100ms cubic-bezier(0.2, 0.9, 0.3, 1);
  --blur-material: blur(28px) saturate(190%);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.apple-dark {
  background-color: var(--bg-black);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  selection-background-color: var(--apple-blue);
  selection-color: #ffffff;
}

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

.glow-top {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #0a84ff 0%, #bf5af2 60%, transparent 100%);
  top: -200px;
  left: 30%;
}

.glow-bottom {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #30d158 0%, #0a84ff 60%, transparent 100%);
  bottom: -200px;
  right: 10%;
}

/* Main Container */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px 60px 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   APPLE TRANSLUCENT HEADER & SEGMENTED NAV
   ========================================================================== */
.glass-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 20px;
  background: var(--bg-card);
  backdrop-filter: var(--blur-material);
  -webkit-backdrop-filter: var(--blur-material);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  box-shadow: var(--specular-highlight), 0 10px 30px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 14px;
  z-index: 100;
  transition: all var(--spring-snappy);
}

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

.logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0a84ff, #bf5af2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

/* Segmented Control Navigation */
.segmented-control {
  display: flex;
  align-items: center;
  background: rgba(30, 30, 34, 0.6);
  border-radius: 12px;
  padding: 3px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.seg-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 9px;
  cursor: pointer;
  transition: color 150ms ease, transform var(--spring-press);
  position: relative;
  z-index: 2;
  user-select: none;
}

.seg-item i {
  width: 15px;
  height: 15px;
}

.seg-item:hover {
  color: var(--text-primary);
}

.seg-item.active {
  color: #ffffff;
  background: transparent;
}

.seg-item:active {
  transform: scale(0.97);
}

.seg-indicator {
  position: absolute;
  top: 3px;
  left: 0;
  height: calc(100% - 6px);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  box-shadow: var(--specular-highlight), 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), width 320ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

/* Header Status Pill */
.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.25);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--apple-mint);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--apple-mint);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--apple-mint);
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.pill-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.pill-badge i {
  width: 13px;
  height: 13px;
}

/* ==========================================================================
   VIEW PANELS & TRANSITIONS
   ========================================================================== */
.content-viewport {
  margin-top: 24px;
}

.view-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px) scale(0.995);
  transition: opacity 250ms cubic-bezier(0.2, 0.9, 0.3, 1), transform 250ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.view-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.page-title-wrap {
  margin-bottom: 24px;
}

.page-heading {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.page-subheading {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
  max-width: 800px;
  line-height: 1.5;
}

/* ==========================================================================
   GLASS CARDS & METRICS (Apple Material)
   ========================================================================== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--blur-material);
  -webkit-backdrop-filter: var(--blur-material);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: var(--specular-highlight), 0 8px 24px rgba(0, 0, 0, 0.3);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 200ms ease, background 200ms ease, transform var(--spring-snappy);
}

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

/* Hero Stats Grid */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px;
}

.stat-overline {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.stat-token-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.stat-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.label-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   DASHBOARD GRID & LIVE EXIT DESK
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.panel-card {
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Inactivity Countdown Badge */
.countdown-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 159, 10, 0.12);
  border: 1px solid rgba(255, 159, 10, 0.3);
  border-radius: 14px;
  color: var(--apple-orange);
  font-size: 12px;
  font-weight: 500;
}

.countdown-badge i {
  width: 14px;
  height: 14px;
}

/* Bonding Curve Bar */
.curve-progress-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

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

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--apple-blue), var(--apple-mint));
  border-radius: 8px;
  transition: width 600ms cubic-bezier(0.2, 0.9, 0.3, 1);
  box-shadow: 0 0 10px rgba(48, 209, 88, 0.4);
}

/* Stats Subgrid */
.stats-subgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.stat-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
}

.cell-label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.cell-val {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

/* Exit Actions Container */
.exit-actions-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.actions-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.actions-label i {
  width: 14px;
  height: 14px;
  color: var(--apple-orange);
}

.sell-button-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.btn-micro-hint {
  display: block;
  font-size: 9px;
  opacity: 0.75;
  margin-top: 2px;
  font-weight: normal;
}

.btn-panic {
  background: linear-gradient(135deg, #ff453a, #d70015) !important;
  color: #ffffff !important;
  border-color: rgba(255, 69, 58, 0.5) !important;
  box-shadow: 0 4px 14px var(--apple-red-glow) !important;
}

/* Quick Sim Bar */
.quick-sim-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.quick-sim-title {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.btn-pill-small {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 5px 11px;
  border-radius: 14px;
  font-size: 11px;
  cursor: pointer;
  transition: all var(--spring-press);
}

.btn-pill-small:hover {
  background: rgba(255, 255, 255, 0.12);
}

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

/* ==========================================================================
   LIVE EVENT STREAM FEED
   ========================================================================== */
.feed-card {
  max-height: 520px;
}

.event-stream {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  flex: 1;
}

/* Apple-style Custom Scrollbar */
.event-stream::-webkit-scrollbar {
  width: 5px;
}
.event-stream::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
}

.event-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  transition: background 150ms ease;
  animation: springEntry 300ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

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

.event-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.event-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-secondary);
}

.event-type-badge {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 9px;
}

.badge-launch { background: rgba(191, 90, 242, 0.2); color: var(--apple-purple); }
.badge-market { background: rgba(48, 209, 88, 0.2); color: var(--apple-mint); }
.badge-scenario { background: rgba(255, 159, 10, 0.2); color: var(--apple-orange); }
.badge-exit { background: rgba(255, 69, 58, 0.2); color: var(--apple-red); }

/* ==========================================================================
   HOMOGLYPH STUDIO & BUNDLE BUILDER
   ========================================================================== */
.studio-layout-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-group {
  margin-bottom: 16px;
}

.apple-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.sub-label {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 5px;
}

.apple-input, .apple-textarea, .apple-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.apple-input:focus, .apple-textarea:focus, .apple-select:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}

.apple-textarea {
  resize: vertical;
}

.homoglyph-action-wrap {
  display: flex;
  gap: 10px;
  margin: 12px 0 18px 0;
}

/* Homoglyph Diff & Script Inspector */
.homoglyph-diff-container {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
}

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

.diff-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.char-badges-flow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.char-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  min-width: 50px;
  transition: all var(--spring-snappy);
}

.char-badge.cyrillic {
  background: rgba(48, 209, 88, 0.1);
  border-color: rgba(48, 209, 88, 0.35);
}

.char-badge.replaceable {
  background: rgba(10, 132, 255, 0.1);
  border-color: rgba(10, 132, 255, 0.3);
}

.char-letter {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
}

.char-codepoint {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-top: 3px;
}

.char-script {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 2px;
}

.char-script.cyr { color: var(--apple-mint); }
.char-script.lat { color: var(--text-tertiary); }

/* DexScreener Live Result Banner */
.dex-result-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.3);
  border-radius: 12px;
}

.dex-status-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(48, 209, 88, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--apple-mint);
  flex-shrink: 0;
}

.dex-status-headline {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.dex-status-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Number Inputs with Quick Presets */
.number-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.apple-input.big-number {
  font-size: 20px;
  font-weight: 700;
  padding-right: 50px;
}

.input-suffix {
  position: absolute;
  right: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
}

.quick-preset-chips {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--spring-press);
}

.chip:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.chip.active {
  background: var(--apple-blue);
  color: #ffffff;
  border-color: var(--apple-blue);
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.35);
}

/* Scheduler Selector */
.schedule-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.schedule-radio {
  cursor: pointer;
}

.schedule-radio input {
  display: none;
}

.radio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--spring-snappy);
}

.radio-card i {
  width: 18px;
  height: 18px;
}

.schedule-radio input:checked + .radio-card {
  background: rgba(10, 132, 255, 0.15);
  border-color: var(--apple-blue);
  color: #ffffff;
  box-shadow: var(--specular-highlight);
}

.schedule-subfield {
  margin-top: 12px;
  animation: springEntry 200ms ease;
}

/* Bundle Summary Card */
.bundle-summary-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 4px 0;
}

.summary-line.highlight-line {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  color: #ffffff;
}

.total-label {
  font-weight: 600;
  font-size: 13px;
}

.total-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--apple-mint);
}

/* ==========================================================================
   BUTTONS (Latency elimination & Apple tactile press)
   ========================================================================== */
.apple-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: transform var(--spring-press), background 150ms ease, box-shadow 150ms ease;
}

/* Respond immediately on press */
.apple-btn:active {
  transform: scale(0.97);
}

.apple-btn i {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--apple-blue);
  color: #ffffff;
  box-shadow: var(--specular-highlight), 0 4px 14px rgba(10, 132, 255, 0.35);
}

.btn-primary:hover {
  background: var(--apple-blue-hover);
}

.btn-sparkle {
  background: linear-gradient(135deg, #0a84ff, #bf5af2);
  box-shadow: 0 4px 16px rgba(191, 90, 242, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-subtle);
  color: var(--text-primary);
  box-shadow: var(--specular-highlight);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-launch-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #30d158, #0a84ff);
  color: #ffffff;
  border-radius: 14px;
  font-size: 15px;
  box-shadow: 0 6px 20px rgba(48, 209, 88, 0.35);
}

.btn-launch-primary:hover {
  filter: brightness(1.06);
}

.btn-danger {
  background: var(--apple-red);
  color: #ffffff;
}

.btn-full {
  width: 100%;
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--apple-blue);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-text-action:hover {
  text-decoration: underline;
}

.icon-btn-micro {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  align-items: center;
}

.icon-btn-micro i {
  width: 12px;
  height: 12px;
}

.icon-btn-micro:hover {
  color: #ffffff;
}

/* ==========================================================================
   AXIOM PRESET CARDS
   ========================================================================== */
.presets-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.preset-card {
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  transition: all var(--spring-snappy);
}

.preset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.preset-card.selected {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 1px var(--apple-blue), 0 8px 30px rgba(10, 132, 255, 0.2);
}

.preset-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.preset-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.preset-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.preset-desc {
  font-size: 12px;
  color: var(--text-secondary);
  min-height: 38px;
  margin-bottom: 16px;
  line-height: 1.45;
}

.preset-specs {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.spec-name {
  color: var(--text-secondary);
}

.spec-value {
  color: #ffffff;
}

.preset-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.radio-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: transparent;
}

.preset-card.selected .radio-dot {
  background: var(--apple-blue);
  border-color: var(--apple-blue);
  box-shadow: 0 0 8px var(--apple-blue);
}

.preset-card.selected .radio-txt {
  color: var(--apple-blue);
  font-weight: 600;
}

/* Info Banner */
.info-banner-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: rgba(10, 132, 255, 0.06);
  border-color: rgba(10, 132, 255, 0.2);
}

.info-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(10, 132, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--apple-blue);
  flex-shrink: 0;
}

.info-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.info-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   SCENARIOS GRID (Auto Exit Engine)
   ========================================================================== */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.scenario-card {
  display: flex;
  flex-direction: column;
}

.scenario-number {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--apple-orange);
  margin-bottom: 6px;
}

.scenario-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.scenario-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 16px;
}

.scenario-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.meta-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text-primary);
}

/* ==========================================================================
   TABLES (Apple Clean List)
   ========================================================================== */
.wallets-table-wrap {
  overflow-x: auto;
}

.apple-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.apple-table th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.apple-table td {
  padding: 16px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.apple-table tr:last-child td {
  border-bottom: none;
}

.apple-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   DOMAIN SETUP WIZARD & CODE SNIPPETS
   ========================================================================== */
.domain-input-wrap {
  display: flex;
  gap: 10px;
}

.setup-step-block {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px;
  position: relative;
}

.step-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(10, 132, 255, 0.15);
  color: var(--apple-blue);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.step-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step-heading {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.dns-table-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
}

.dns-col b {
  color: var(--text-secondary);
  font-size: 10px;
}

.dns-col code {
  color: var(--apple-mint);
  font-family: var(--font-mono);
  display: block;
  margin-top: 4px;
}

.code-block {
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e4e4e7;
  overflow-x: auto;
  line-height: 1.5;
  white-space: pre;
}

.btn-copy-code {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 10px;
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
}

.btn-copy-code i {
  width: 12px;
  height: 12px;
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   BADGES & UTILITIES
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-success { background: rgba(48, 209, 88, 0.15); color: var(--apple-mint); border: 1px solid rgba(48, 209, 88, 0.3); }
.badge-accent  { background: rgba(10, 132, 255, 0.15); color: var(--apple-blue); border: 1px solid rgba(10, 132, 255, 0.3); }
.badge-danger  { background: rgba(255, 69, 58, 0.15); color: var(--apple-red);  border: 1px solid rgba(255, 69, 58, 0.3); }
.badge-standard{ background: rgba(255, 159, 10, 0.15); color: var(--apple-orange); border: 1px solid rgba(255, 159, 10, 0.3); }
.badge-lowfee  { background: rgba(48, 209, 88, 0.15); color: var(--apple-mint); border: 1px solid rgba(48, 209, 88, 0.3); font-weight: 600; font-size: 11px; }

.mono-text { font-family: var(--font-mono); }
.text-accent { color: var(--apple-blue); }
.text-mint { color: var(--apple-mint); }
.text-danger { color: var(--apple-red); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

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

.toast {
  pointer-events: auto;
  background: rgba(28, 28, 30, 0.92);
  backdrop-filter: var(--blur-material);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 13px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toastSpringIn 300ms cubic-bezier(0.2, 0.9, 0.3, 1);
  transition: opacity 200ms ease, transform 200ms ease;
}

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

.toast.toast-leave {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
}

/* ==========================================================================
   DASHBOARD APPLE EMPTY STATE
   ========================================================================== */
.empty-position-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 16px;
  animation: fadeIn 300ms ease;
}

.empty-state-glow-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(10, 132, 255, 0.12);
  border: 1px solid rgba(10, 132, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--apple-blue);
  box-shadow: 0 0 30px rgba(10, 132, 255, 0.25);
  margin-bottom: 4px;
}

.empty-state-glow-icon i {
  width: 30px;
  height: 30px;
}

.empty-state-title {
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

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

.empty-state-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.empty-state-actions .apple-btn {
  min-height: 44px;
  padding: 12px 20px;
}

/* ==========================================================================
   HOMOGLYPH STUDIO SPLIT VIEW & LOOKALIKE INSPECTOR
   ========================================================================== */
.studio-card-wide {
  grid-column: 1 / -1;
}

.studio-split-row, .bundle-split-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  align-items: start;
}

.studio-col-inputs, .studio-col-inspector, .bundle-col-inputs, .bundle-col-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.homoglyph-quick-legend {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.legend-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  display: block;
  margin-bottom: 8px;
}

.legend-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.legend-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  user-select: all;
  transition: all 120ms ease;
}

.legend-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.char-lookalike-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--apple-mint);
  margin-top: 2px;
}

/* ==========================================================================
   MOBILE FLOATING DOCK (< 768px)
   ========================================================================== */
.mobile-bottom-dock {
  display: none;
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  left: 10px;
  right: 10px;
  max-width: 460px;
  margin: 0 auto;
  background: rgba(18, 18, 22, 0.88);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  z-index: 999;
  padding: 6px 8px;
  justify-content: space-around;
  align-items: center;
}

.mobile-dock-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  min-width: 44px;
  padding: 4px 2px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 16px;
  user-select: none;
  transition: color 150ms ease, background 200ms ease, transform 120ms cubic-bezier(0.2, 0.9, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}

.mobile-dock-item:active {
  transform: scale(0.92);
}

.mobile-dock-item.active {
  color: var(--apple-blue);
  background: rgba(10, 132, 255, 0.14);
  box-shadow: 0 0 12px rgba(10, 132, 255, 0.2);
}

.dock-icon-wrap {
  position: relative;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-icon-wrap i {
  width: 19px;
  height: 19px;
}

.dock-label {
  font-size: clamp(8.5px, 2.2vw, 10px);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

.mobile-dock-badge {
  position: absolute;
  top: -4px;
  right: -9px;
  background: var(--apple-red);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(255, 69, 58, 0.5);
  min-width: 14px;
  text-align: center;
}

/* ==========================================================================
   ENHANCED COMPONENTS (Positions, IPFS Dropzone, Scheduled Queue, Dual Tabs)
   ========================================================================== */

/* Multi-Position Selector Pill Bar */
.position-selector-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  backdrop-filter: var(--blur-material);
  -webkit-backdrop-filter: var(--blur-material);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.pos-bar-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.position-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.pos-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--spring-snappy);
}

.pos-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
}

.pos-chip.active {
  background: rgba(10, 132, 255, 0.2);
  border-color: rgba(10, 132, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(10, 132, 255, 0.25);
}

.pos-chip-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
}

/* Dual Inspector Target Tabs */
.diff-target-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.diff-tab-btn {
  padding: 4px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
}

.diff-tab-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* IPFS Token Artwork Dropzone */
.ipfs-upload-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
}

.ipfs-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ipfs-dropzone {
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--spring-snappy);
  background: rgba(255, 255, 255, 0.02);
}

.ipfs-dropzone:hover, .ipfs-dropzone.dragover {
  border-color: var(--apple-blue);
  background: rgba(10, 132, 255, 0.06);
}

.ipfs-placeholder i {
  width: 28px;
  height: 28px;
  color: var(--apple-blue);
  margin-bottom: 6px;
}

.dropzone-text {
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dropzone-sub {
  font-size: 11px;
  color: var(--text-tertiary);
}

.ipfs-preview-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.token-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ipfs-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.ipfs-file-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.ipfs-cid-link {
  font-size: 11px;
  color: var(--apple-mint);
  word-break: break-all;
}

.ipfs-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Scheduled Queue Box */
.scheduled-queue-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
}

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

.queue-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.queue-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 12px;
}

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

.queue-item-name {
  font-weight: 600;
  color: #ffffff;
}

.queue-item-meta {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ==========================================================================
   TELEGRAM FEED & ALERT POSTS (Apple Design)
   ========================================================================== */

/* Live Stream Status Pill */
.stream-live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--apple-mint);
  white-space: nowrap;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--apple-mint);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--apple-mint);
  animation: pulseGlow 1.8s infinite ease-in-out;
}

.badge-count {
  background: var(--apple-red);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  box-shadow: 0 0 8px rgba(255, 69, 58, 0.5);
  animation: popIn 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

/* Toolbar & Filter Ribbon */
.tg-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tg-search-wrap {
  position: relative;
  min-width: 320px;
  flex: 1;
}

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

.tg-search-input {
  padding-left: 38px !important;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.04);
}

.tg-filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tg-stats-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-size: 12px;
}

.pill-label {
  color: var(--text-secondary);
}

.pill-value {
  color: #ffffff;
  font-weight: 600;
}

/* Feed List & Cards */
.tg-feed-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 30px;
}

.tg-loading-state, .tg-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  color: var(--text-secondary);
  gap: 14px;
}

.apple-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--apple-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@keyframes postArrival {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
    box-shadow: 0 0 25px rgba(10, 132, 255, 0.4);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tg-post-card {
  background: rgba(24, 24, 28, 0.78);
  backdrop-filter: var(--blur-material);
  -webkit-backdrop-filter: var(--blur-material);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--specular-highlight), 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: transform var(--spring-snappy), border-color 200ms ease, box-shadow 200ms ease;
}

.tg-post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--specular-highlight-bold), 0 12px 36px rgba(0, 0, 0, 0.5);
}

.tg-post-card.new-arrival {
  animation: postArrival 500ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  border-color: rgba(10, 132, 255, 0.45);
}

/* Post Top Header */
.tg-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tg-channel-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--apple-blue);
  background: rgba(10, 132, 255, 0.12);
  border: 1px solid rgba(10, 132, 255, 0.25);
  padding: 4px 10px;
  border-radius: 12px;
}

.tg-time-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.tg-time-badge i {
  width: 13px;
  height: 13px;
}

/* Alert Reason Banner (e.g. "⚠️ Dev сбросил 100%...") */
.tg-alert-badge-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.tg-alert-badge-box.warning {
  background: rgba(255, 159, 10, 0.12);
  border: 1px solid rgba(255, 159, 10, 0.3);
  color: #ffb340;
}

.tg-alert-badge-box.fire {
  background: rgba(255, 69, 58, 0.12);
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: #ff6961;
}

.tg-alert-badge-box.purple {
  background: rgba(191, 90, 242, 0.12);
  border: 1px solid rgba(191, 90, 242, 0.3);
  color: #d17df9;
}

.tg-alert-badge-box.cyan {
  background: rgba(100, 210, 255, 0.12);
  border: 1px solid rgba(100, 210, 255, 0.3);
  color: var(--apple-cyan);
}

.tg-alert-badge-box.accent {
  background: rgba(10, 132, 255, 0.12);
  border: 1px solid rgba(10, 132, 255, 0.3);
  color: var(--apple-blue);
}

/* Post Main Profile & CA */
.tg-post-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.tg-token-avatar-wrap {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  background: #111;
}

.tg-token-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tg-token-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tg-token-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.tg-token-name {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.tg-token-symbol {
  font-size: 14px;
  font-weight: 700;
  color: var(--apple-blue);
  background: rgba(10, 132, 255, 0.14);
  padding: 2px 8px;
  border-radius: 6px;
}

.tg-token-ca-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-ca-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  user-select: all;
  cursor: pointer;
  transition: all 150ms ease;
}

.tg-ca-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.tg-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 150ms ease;
}

.tg-copy-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.tg-copy-btn.copied {
  color: var(--apple-mint);
}

/* External Links Pill Row */
.tg-links-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.tg-link-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 150ms ease;
}

.tg-link-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.tg-link-pill i {
  width: 12px;
  height: 12px;
}

/* Post Metrics Grid */
.tg-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 14px 16px;
}

.tg-metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tg-metric-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.tg-metric-value {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.tg-metric-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Inline Action Buttons Toolbar (Identical to Telegram Bot) */
.tg-actions-toolbar {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1.3fr;
  gap: 10px;
  margin-top: 4px;
}

.tg-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform var(--spring-press), box-shadow 200ms ease, background 200ms ease, border-color 200ms ease;
  user-select: none;
}

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

.tg-action-btn i {
  width: 16px;
  height: 16px;
}

.btn-tg-relaunch {
  background: linear-gradient(135deg, #0a84ff, #0071e3);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
}

.btn-tg-relaunch:hover {
  background: linear-gradient(135deg, #2b95ff, #0077ed);
  box-shadow: 0 6px 20px rgba(10, 132, 255, 0.5);
}

.btn-tg-turbo {
  background: linear-gradient(135deg, #ff9f0a, #ff6b00);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 159, 10, 0.35);
}

.btn-tg-turbo:hover {
  background: linear-gradient(135deg, #ffae2b, #ff7b1a);
  box-shadow: 0 6px 20px rgba(255, 159, 10, 0.5);
}

.btn-tg-configure {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-tg-configure:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-tg-auto {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.btn-tg-auto:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-tg-auto.active {
  background: rgba(48, 209, 88, 0.15);
  border-color: rgba(48, 209, 88, 0.4);
  color: var(--apple-mint);
  box-shadow: 0 0 12px rgba(48, 209, 88, 0.25);
}

/* Load more container */
.tg-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

/* ==========================================================================
   TELEGRAM CARDS DESKTOP WIDE LAYOUT & RESPONSIVE COMPONENTS
   ========================================================================== */
.tg-card-main-layout {
  display: grid;
  grid-template-columns: 340px 1fr 220px;
  gap: 20px;
  align-items: center;
}

.tg-col-identity {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.tg-col-metrics {
  min-width: 0;
}

.tg-col-actions {
  min-width: 0;
}

.tg-col-actions .tg-actions-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.tg-col-actions .tg-action-btn {
  width: 100%;
  min-height: 42px;
}

.ca-full {
  display: inline;
}

.ca-short {
  display: none;
}

/* Wallets Table Responsive Elements */
.wallet-addr-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-pubkey-full {
  display: inline;
}

.wallet-pubkey-short {
  display: none;
}

.wallet-refresh-btn {
  padding: 6px 12px;
  font-size: 12px;
  gap: 6px;
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   APPLE DESIGN RESPONSIVE MASTER SYSTEM (Desktop ≥ 768px & Mobile < 768px)
   ========================================================================== */

/* Tablet & Intermediate (≤ 1080px) */
@media (max-width: 1080px) {
  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid, .studio-layout-grid, .scenarios-grid, .presets-cards-grid {
    grid-template-columns: 1fr;
  }
  .studio-split-row, .bundle-split-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .header-status .server-badge {
    display: none;
  }
  .seg-item {
    padding: 7px 10px;
    font-size: 12px;
    gap: 5px;
  }
  .tg-card-main-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
  }
  .tg-col-actions .tg-actions-toolbar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Mobile Devices (< 768px: iPhone, Android, Touch Screens) */
@media (max-width: 768px) {
  /* Prevent Any Horizontal Overflow */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .app-container {
    padding: 10px 12px calc(86px + env(safe-area-inset-bottom, 0px)) 12px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .content-viewport, .view-panel {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Compact Native Apple Top Bar */
  .glass-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 18px;
    top: 6px;
    margin-bottom: 12px;
  }

  /* Hide Desktop Segmented Navigation (Handled by Floating Bottom Dock) */
  .segmented-control {
    display: none !important;
  }

  /* Activate Floating Frosted-Glass Bottom Dock */
  .mobile-bottom-dock {
    display: flex !important;
  }

  /* Typography Scaling for Mobile */
  .page-title-wrap {
    margin-bottom: 16px;
  }

  .page-heading {
    font-size: clamp(20px, 5.5vw, 24px);
    letter-spacing: -0.025em;
  }

  .page-subheading {
    font-size: 13px;
    line-height: 1.5;
  }

  /* Position Selector Bar */
  .position-selector-bar {
    padding: 8px 12px;
    margin-bottom: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .pos-chip {
    min-height: 44px !important;
    padding: 8px 14px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  /* Hero Stats Grid: 2 Columns on Tablet/Mobile */
  .hero-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 14px 12px;
    border-radius: 16px;
  }

  .stat-token-name {
    font-size: 16px;
  }

  .stat-value {
    font-size: 22px;
  }

  #heroTokenCopyBtn {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  /* Touch Targets for Quick Sells */
  .sell-button-group {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .sell-button-group .apple-btn {
    min-height: 48px;
    padding: 10px 8px;
  }

  .quick-sim-bar {
    gap: 6px;
  }

  .btn-pill-small {
    min-height: 44px !important;
    padding: 8px 12px !important;
    font-size: 12px;
    display: inline-flex !important;
    align-items: center !important;
  }

  .btn-text-action {
    min-height: 44px !important;
    min-width: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 12px !important;
  }

  /* Telegram Toolbar on Mobile: Strict Zero Horizontal Overflow */
  .tg-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
    margin-bottom: 16px;
  }

  .tg-search-wrap {
    min-width: 0 !important;
    width: 100% !important;
  }

  .tg-search-input {
    min-height: 44px;
    font-size: 13px;
    width: 100%;
  }

  .tg-filter-chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    gap: 8px;
    scrollbar-width: none;
  }

  .tg-filter-chips::-webkit-scrollbar {
    display: none;
  }

  .chip, .quick-preset-chips .chip {
    flex-shrink: 0;
    min-height: 44px !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .tg-stats-summary {
    justify-content: space-between;
    width: 100%;
  }

  /* Telegram Cards Mobile Polish (Stacked) */
  .tg-post-card {
    padding: 14px;
    border-radius: 18px;
    gap: 12px;
  }

  .tg-card-main-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .tg-post-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .tg-post-body {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }

  .tg-token-avatar-wrap {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    flex-shrink: 0;
  }

  .tg-token-details {
    min-width: 0;
  }

  .tg-token-name {
    font-size: 16px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tg-token-ca-row {
    width: 100%;
    max-width: 100%;
  }

  .tg-ca-pill {
    max-width: calc(100% - 50px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
  }

  .ca-full {
    display: none !important;
  }

  .ca-short {
    display: inline !important;
  }

  .tg-copy-btn {
    min-width: 44px;
    min-height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tg-links-row {
    gap: 6px;
  }

  .tg-link-pill {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
  }

  .tg-metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 14px;
  }

  .tg-col-actions .tg-actions-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
  }

  .tg-action-btn {
    min-height: 46px;
    font-size: 12px;
    padding: 10px 8px;
    gap: 6px;
    border-radius: 12px;
  }

  /* Homoglyph Studio Mobile */
  .studio-split-row, .bundle-split-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .homoglyph-action-wrap {
    flex-direction: column;
    gap: 10px;
  }

  .homoglyph-action-wrap .apple-btn {
    width: 100%;
    min-height: 48px;
  }

  .diff-target-tabs .diff-tab-btn {
    min-height: 44px;
    padding: 8px 16px;
  }

  .ipfs-dropzone {
    padding: 24px 16px;
  }

  .btn-launch-primary {
    min-height: 52px;
    font-size: 15px;
  }

  /* Wallets Table Mobile Wrap */
  .wallets-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .apple-table th, .apple-table td {
    padding: 12px 10px;
  }

  .wallet-pubkey-full {
    display: none !important;
  }

  .wallet-pubkey-short {
    display: inline !important;
  }

  .wallet-copy-btn, .apple-table .icon-btn-micro {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .wallet-refresh-btn {
    min-height: 44px !important;
    padding: 8px 14px !important;
  }
}

/* Compact Smartphones (360px - 440px: iPhone SE, 13 mini, Galaxy S) */
@media (max-width: 480px) {
  /* Hide server IP text to avoid header congestion */
  .header-status .server-badge {
    display: none;
  }

  .status-indicator {
    padding: 5px 10px;
    font-size: 11px;
  }

  .hero-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .schedule-selector {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .schedule-radio .radio-card {
    min-height: 46px;
    padding: 10px 14px;
  }

  .tg-col-actions .tg-actions-toolbar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .tg-action-btn {
    font-size: 11px;
    padding: 8px 4px;
    min-height: 46px;
  }

  .tg-action-btn i {
    width: 14px;
    height: 14px;
  }

  .empty-position-view {
    padding: 32px 14px;
  }

  .empty-state-actions {
    flex-direction: column;
    width: 100%;
  }

  .empty-state-actions .apple-btn {
    width: 100%;
    min-height: 46px;
  }
}


