/* ==========================================================================
   IRANSansX Fonts (with Native Farsi Numerals)
   ========================================================================== */
@font-face {
  font-family: 'IRANSansX';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/IRANSansXFaNum-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'IRANSansX';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/IRANSansXFaNum-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'IRANSansX';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/IRANSansXFaNum-DemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'IRANSansX';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/IRANSansXFaNum-Bold.woff2') format('woff2');
}

/* ==========================================================================
   PromptCraft (پرامپت‌کرفت) - Official Design Tokens & UI Styles
   Based on PromptCraft Brand Kit v1.0.0
   ========================================================================== */

:root {
  /* Brand Primitives - True High-Tech Royal Blue & Electric Cyan */
  --pc-brand-indigo: #2563eb;
  --pc-brand-violet: #0284c7;
  --pc-brand-cyan: #06b6d4;
  --pc-brand-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #0ea5e9 100%);
  
  /* Fonts */
  --font-fa: 'IRANSansX', 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-en: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing Tokens */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;

  /* Radius Tokens */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.2, 0, 0, 1);
  --transition-normal: 240ms cubic-bezier(0.2, 0, 0, 1);
}

/* Dark Theme Tokens (Default) */
:root,
html.dark-mode,
body.dark-mode,
[data-theme="dark"] {
  --bg-app: #05070a;
  --bg-frame: #090C10;
  --bg-surface: #161B22;
  --bg-surface-raised: #1E2633;
  --bg-input: #0d1117;
  --border-color: #263142;
  --border-focus: #2563eb;
  --text-main: #F8FAFC;
  --text-muted: #CBD5E1; /* WCAG AAA: 10.7:1 on #161B22 */
  --text-dim: #94A3B8;   /* WCAG AA: 6.75:1 on #161B22 */
  --text-subtle: #64748B;
  --text-accent-blue: #60A5FA;    /* WCAG AAA: 7.4:1 */
  --text-accent-emerald: #34D399; /* WCAG AAA: 8.2:1 */
  --text-accent-amber: #FBBF24;   /* WCAG AAA: 10.8:1 */
  --text-accent-rose: #F87171;    /* WCAG AA: 6.1:1 */
  --chip-bg: #1E2633;
  --chip-text: #CBD5E1;
  --chip-active-bg: #2563eb;
  --chip-active-text: #FFFFFF;
  --nav-bg: rgba(22, 27, 34, 0.85);
  --nav-pill: rgba(37, 99, 235, 0.18);
  --nav-active-text: #60a5fa;
  --shadow-frame: 0 18px 45px rgba(0, 0, 0, 0.65);
  --game-bg: #090C10;
}

/* Light Theme Tokens */
html.light-mode,
body.light-mode,
[data-theme="light"] {
  --bg-app: #eef2f6;
  --bg-frame: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-raised: #EEF6FF;
  --bg-input: #FFFFFF;
  --border-color: #CBD5E1;
  --border-focus: #2563eb;
  --text-main: #0F172A;   /* WCAG AAA: 17.8:1 on #FFFFFF */
  --text-muted: #334155;  /* WCAG AAA: 9.5:1 on #FFFFFF */
  --text-dim: #475569;    /* WCAG AAA: 7.58:1 on #FFFFFF, 6.95:1 on #EEF6FF */
  --text-subtle: #94A3B8;
  --text-accent-blue: #1D4ED8;    /* WCAG AAA: 7.1:1 on #FFFFFF */
  --text-accent-emerald: #047857; /* WCAG AA: 5.8:1 on #FFFFFF (Fixes 2.54:1 fail) */
  --text-accent-amber: #92400E;   /* WCAG AA: 5.3:1 on #FFFFFF (Fixes 2.92:1 fail) */
  --text-accent-rose: #B91C1C;    /* WCAG AA: 6.2:1 on #FFFFFF */
  --chip-bg: #EFF6FF;
  --chip-text: #1E3A8A;
  --chip-active-bg: #2563eb;
  --chip-active-text: #FFFFFF;
  --nav-bg: rgba(255, 255, 255, 0.88);
  --nav-pill: rgba(37, 99, 235, 0.12);
  --nav-active-text: #2563eb;
  --shadow-frame: 0 16px 40px rgba(0, 0, 0, 0.1);
  --game-bg: #F8FAFC;
}


/* Standard High-Contrast Placeholders (WCAG Compliant) */
::placeholder {
  color: var(--text-dim) !important;
  opacity: 0.88;
}
input::placeholder,
textarea::placeholder {
  color: var(--text-dim) !important;
  opacity: 0.88;
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-fa);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-frame);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  transition: background-color var(--transition-normal);
}

/* Mobile App Frame: 100% Edge-to-Edge Fluid on Mobile Devices */
.mobile-frame-container {
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-frame);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: none;
  box-shadow: none;
  transition: background var(--transition-normal);
}

/* Desktop Browser preview mode (simulates phone casing only on actual wide desktop screens with mouse) */
@media (min-width: 801px) and (hover: hover) and (pointer: fine) {
  body {
    background-color: var(--bg-app);
  }
  .mobile-frame-container {
    max-width: 430px;
    height: 880px;
    max-height: calc(100dvh - 32px);
    margin: 16px auto;
    border-radius: 36px;
    box-shadow: var(--shadow-frame);
    border: 1px solid var(--border-color);
  }
}

/* Mobile & Touch Devices: 100% Edge-to-Edge Fluid (Zero dead margins, flush status and nav bars) */
@media (max-width: 800px), (hover: none), (pointer: coarse) {
  body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-frame);
  }
  .mobile-frame-container {
    width: 100vw;
    width: 100%;
    max-width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
}

.mobile-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* App Header */
.app-header {
  padding: 4px 12px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-frame);
  z-index: 20;
  min-height: 48px;
}

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

.brand-logo-img,
.brand-logo-svg {
  height: 28px;
  width: 28px;
  display: block;
  flex-shrink: 0;
  border-radius: 8px;
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.45));
  transition: transform var(--transition-fast);
}

.brand-logo-img:hover,
.brand-logo-svg:hover {
  transform: scale(1.05);
}

/* Jorsh: preserve the supplied lockup proportions and minimum display width. */
.header-brand-wrap .brand-logo-img {
  width: 120px;
  height: 32px;
  border-radius: 0;
  filter: none;
  object-fit: contain;
}

.brand-title-persian {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  background: linear-gradient(135deg, #FFFFFF 40%, #A5B4FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
}

body.light-mode .brand-title-persian,
[data-theme="light"] .brand-title-persian {
  background: linear-gradient(135deg, #0F172A 30%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.wallet-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-fast);
}

.wallet-badge:hover {
  transform: scale(1.03);
  border-color: var(--pc-brand-indigo);
}

.wallet-icon {
  font-size: 13px;
}

.wallet-icon-svg {
  color: var(--pc-brand-indigo);
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.wallet-count {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--pc-brand-indigo);
  line-height: 1;
}

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

/* Main Content Area */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px 84px 10px !important;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.app-content::-webkit-scrollbar {
  display: none;
}

/* View Sections */
.view-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.view-section.hidden,
.step-card.hidden,
.modal-overlay.hidden,
.hidden {
  display: none !important;
}

/* Step Cards */
.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.25s ease;
}

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

.input-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 2px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: rgba(99, 102, 241, 0.14);
  color: var(--pc-brand-indigo);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pill-svg {
  flex-shrink: 0;
}

.input-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin-top: 2px;
}

.input-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.textarea-wrapper textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: var(--transition-fast);
}

.textarea-wrapper textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Quick Scenarios */
.quick-scenarios-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.quick-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chips-scroll::-webkit-scrollbar {
  display: none;
}

.suggestion-chip {
  background: var(--chip-bg);
  border: 1px solid var(--border-color);
  color: var(--chip-text);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.suggestion-chip .chip-svg {
  flex-shrink: 0;
  stroke: var(--text-muted);
  transition: stroke var(--transition-fast);
}

.suggestion-chip:hover {
  background: var(--pc-brand-indigo);
  color: #fff;
  border-color: transparent;
}

.suggestion-chip:hover .chip-svg {
  stroke: #fff;
}

/* Primary and Secondary Action Buttons */
.primary-btn {
  background: var(--pc-brand-gradient);
  border: none;
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: var(--transition-fast);
  width: 100%;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.primary-btn:active {
  transform: translateY(1px);
}

.primary-btn.green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-cost-tag {
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
}

.secondary-btn {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
  text-align: center;
}

.secondary-btn:active {
  transform: scale(0.98);
}

.secondary-btn:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.btn-skip-action {
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
}

.btn-skip-action:hover {
  border-color: var(--pc-brand-indigo);
  border-style: solid;
  background: rgba(99, 102, 241, 0.06);
  color: var(--pc-brand-indigo);
}

.btn-skip-svg {
  width: 15px;
  height: 15px;
  display: block;
  flex-shrink: 0;
  color: currentColor;
  transition: transform var(--transition-fast);
}

.btn-skip-action:hover .btn-skip-svg {
  transform: translateX(-3px);
}

/* Interactive Loading & Gamified Waiting Arena */
.loading-status-tracker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.tracker-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spinner-mini {
  width: 16px;
  height: 16px;
  border: 2px solid var(--pc-brand-indigo);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.tracker-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.tracker-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.game-arena-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--pc-brand-indigo);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-svg {
  flex-shrink: 0;
}

.game-score-box {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.game-score-box strong {
  color: var(--pc-brand-indigo);
  font-size: 14px;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  height: 135px;
  background: var(--game-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  gap: 3px;
  text-align: center;
  padding: 8px;
}

.game-overlay small {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
  font-weight: 400;
}

.game-reward-banner {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-accent-emerald);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.reward-svg {
  flex-shrink: 0;
}

.game-footer-hint {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hint-svg {
  stroke: #f59e0b;
  flex-shrink: 0;
}

.ai-ready-banner {
  background: var(--pc-brand-gradient);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  animation: slideUp 0.25s ease;
}

.ready-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ready-text-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.ready-svg {
  flex-shrink: 0;
}

.proceed-btn {
  background: #fff;
  color: var(--pc-brand-indigo);
  border: none;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
}

.proceed-btn:hover {
  transform: scale(1.04);
}

/* Questions View */
.scenario-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.category-badge {
  background: rgba(99, 102, 241, 0.14);
  color: var(--pc-brand-indigo);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}

.scenario-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.friendly-guide {
  font-size: 12px;
  color: var(--text-muted);
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-item-card {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.question-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  flex: 1;
}

.question-type-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pc-brand-indigo);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.question-hint-text {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.4;
}

.question-input-wrap {
  width: 100%;
  margin-top: 4px;
}

.question-text-input {
  width: 100%;
  height: 44px;
  background: var(--bg-frame);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-fast);
}

.question-text-input:focus {
  border-color: var(--pc-brand-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

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

.options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.option-chip {
  background: var(--bg-frame);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.option-chip:hover {
  border-color: var(--pc-brand-indigo);
  color: #fff;
}

.option-chip:active {
  transform: scale(0.97);
}

.option-chip.selected {
  background: var(--pc-brand-indigo);
  color: #fff;
  border-color: var(--pc-brand-indigo);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.custom-detail-box {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.custom-detail-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-detail-box input {
  min-height: 48px;
  height: 48px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.custom-detail-box input:focus {
  border-color: var(--pc-brand-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.questions-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

/* Step 4: Result View */
.result-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result-success-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  align-self: flex-start;
}

.badge-success-svg {
  flex-shrink: 0;
}

.target-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.prompt-box-container {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.prompt-box-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
}

.copy-btn {
  background: var(--pc-brand-indigo);
  border: none;
  color: #fff;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.copy-svg-icon {
  flex-shrink: 0;
}

.copy-btn:hover {
  background: #4f46e5;
}

.prompt-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
  font-family: var(--font-en), var(--font-fa);
}

.prompt-fa-summary {
  background: var(--bg-surface-raised);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.5;
}

.summary-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--pc-brand-indigo);
  display: block;
  margin-bottom: 2px;
}

.tips-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-main);
}

.tip-svg {
  stroke: #f59e0b;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   Profile View (Ultra-Minimalist, Unified & Clean)
   ========================================================================== */

.minimal-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 2px;
}

.user-avatar-wrap {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(139, 92, 246, 0.22) 100%);
  border: 1.5px solid rgba(99, 102, 241, 0.45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

/* Static avatar: no hover scaling */

.user-avatar-svg {
  width: 22px;
  height: 22px;
  color: #818cf8;
  display: block;
}

[data-theme="light"] .user-avatar-wrap {
  background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
  border-color: #c7d2fe;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .user-avatar-svg {
  color: #4f46e5;
}

.user-meta {
  flex: 1;
}

.user-display-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.user-status-text {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Theme Toggle Button - Distinct, Tactile & Perfectly Centered */
.minimal-theme-btn {
  background: #1e293b;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  line-height: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  position: relative;
  flex-shrink: 0;
}

.minimal-theme-btn:hover {
  transform: scale(1.08);
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.minimal-theme-btn:active {
  transform: scale(0.92);
}

[data-theme="light"] .minimal-theme-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .minimal-theme-btn:hover {
  border-color: #4f46e5;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

#theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 0;
  pointer-events: none;
}

.theme-svg {
  display: block;
  flex-shrink: 0;
  color: var(--text-muted);
  filter: none !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease, fill 0.2s ease;
}

/* Neutral subtle theme icon on hover & active */
.header-theme-btn:hover .theme-svg,
.header-theme-btn:active .theme-svg {
  color: var(--text-primary);
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.icon-btn-edit {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.icon-btn-edit:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--pc-brand-indigo);
  color: #FFFFFF;
}

/* ==========================================================================
   Sophisticated Edit Username Card (PromptCraft Official Design Language)
   ========================================================================== */
.edit-username-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  animation: slideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  transition: background var(--transition-normal), border var(--transition-normal);
}

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

.edit-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.edit-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.edit-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edit-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

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

.btn-close-card {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-close-card:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

/* Branded Input with Icon Prefix */
.edit-input-container {
  width: 100%;
}

.input-with-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon-wrap .field-icon {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.brand-text-input {
  width: 100%;
  min-height: 48px;
  height: 48px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0 42px 0 14px; /* clearance for prefix icon in RTL */
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.brand-text-input:focus {
  border-color: var(--pc-brand-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.brand-text-input:focus + .field-icon,
.input-with-icon-wrap:focus-within .field-icon {
  color: var(--pc-brand-indigo);
}

/* Action Buttons */
.edit-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-brand-save {
  flex: 1;
  min-height: 48px;
  height: 48px;
  background: var(--pc-brand-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-brand-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.btn-brand-save:active {
  transform: translateY(1px);
}

.btn-brand-cancel {
  min-height: 48px;
  height: 48px;
  padding: 0 18px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-brand-cancel:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
}

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

body.light-mode .edit-icon-badge,
[data-theme="light"] .edit-icon-badge {
  background: #EEF2FF;
  border-color: #C7D2FE;
  color: #4F46E5;
}

body.light-mode .btn-close-card:hover,
[data-theme="light"] .btn-close-card:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Minimal Flat Wallet Card */
.minimal-wallet-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: row; /* Horizontal: Balance on right, Buttons stacked on left in RTL */
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  transition: background var(--transition-normal), border var(--transition-normal);
}

.wallet-info-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.wallet-mini-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.2px;
}

.wallet-balance-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

#profile-wallet-badge {
  width: fit-content;
  cursor: pointer;
}

.wallet-number {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: #818cf8;
  letter-spacing: -0.2px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 4px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.light-mode .wallet-number,
[data-theme="light"] .wallet-number {
  color: #4F46E5;
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.22);
}

.wallet-unit-caption {
  display: none !important;
}

/* Vertically stacked action buttons on the left side */
.wallet-actions-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 135px;
  flex-shrink: 0;
}

.wallet-btn-brand {
  width: 100%;
  min-height: 38px;
  height: 38px;
  background: var(--pc-brand-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.wallet-btn-brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.wallet-btn-brand:active {
  transform: translateY(1px);
}

.wallet-btn-outline {
  width: 100%;
  min-height: 36px;
  height: 36px;
  background: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.wallet-btn-outline:hover {
  border-color: var(--pc-brand-indigo);
  color: var(--pc-brand-indigo);
  background: rgba(99, 102, 241, 0.08);
}

.wallet-btn-outline:active {
  transform: scale(0.98);
}

body.light-mode .wallet-btn-outline,
[data-theme="light"] .wallet-btn-outline {
  border-color: #cbd5e1;
  color: #1e293b;
}

body.light-mode .wallet-btn-outline:hover,
[data-theme="light"] .wallet-btn-outline:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.06);
}

/* Minimal Grouped Settings Card */
.minimal-group-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.minimal-list-item {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

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

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

.item-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pc-brand-indigo);
  flex-shrink: 0;
}

.item-svg {
  flex-shrink: 0;
}

.item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  line-height: 1.3;
}

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

.item-status-pill {
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-surface-raised);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.item-status-pill.verified {
  background: rgba(16, 185, 129, 0.1);
  color: var(--text-accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.item-sub-val {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
}

.item-body {
  margin-top: 2px;
}

.compact-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.compact-input-row input {
  flex: 1;
  min-height: 48px;
  height: 48px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.compact-input-row input:focus {
  border-color: var(--pc-brand-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

#friend-referral-input {
  direction: rtl !important;
  text-align: right !important;
  font-family: 'IRANSansXFaNum', 'IRANSansX', var(--font-main), sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  padding: 0 14px !important;
}

#friend-referral-input::placeholder {
  direction: rtl !important;
  text-align: right !important;
  text-transform: none;
  letter-spacing: normal;
  font-family: 'IRANSansXFaNum', 'IRANSansX', var(--font-main), sans-serif !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  color: var(--text-dim) !important;
  opacity: 0.85;
}

.compact-action-btn {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  min-height: 48px;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.compact-action-btn.primary {
  background: var(--pc-brand-indigo);
  color: #fff;
  border-color: var(--pc-brand-indigo);
}

.compact-otp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.compact-otp-row input {
  width: 110px;
  min-height: 48px;
  height: 48px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-main);
  text-align: center;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.compact-otp-row input:focus {
  border-color: var(--pc-brand-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.email-hint-notice {
  font-size: 11.5px;
  color: var(--pc-brand-violet, #a78bfa);
  background: rgba(167, 139, 250, 0.08);
  border: 1px dashed rgba(167, 139, 250, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  line-height: 1.6;
  text-align: right;
  direction: rtl;
}

.verified-simple-row {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-accent-emerald);
  display: flex;
  align-items: center;
  gap: 6px;
}

.verified-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}

.minimal-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px dashed rgba(99, 102, 241, 0.22);
  border-radius: 10px;
  margin-top: 6px;
}

.notice-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-icon-wrap svg {
  width: 15px;
  height: 15px;
  color: #818cf8;
  display: block;
}

.notice-text-content {
  flex: 1;
  line-height: 1.5;
  display: inline;
}

.notice-link-btn {
  background: none;
  border: none;
  color: #818cf8;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0 4px;
  font-family: inherit;
  display: inline;
  vertical-align: baseline;
  transition: color var(--transition-fast);
}

.notice-link-btn:hover {
  color: #6366f1;
}

body.light-mode .minimal-notice,
[data-theme="light"] .minimal-notice {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-mode .notice-icon-wrap svg,
[data-theme="light"] .notice-icon-wrap svg,
body.light-mode .notice-link-btn,
[data-theme="light"] .notice-link-btn {
  color: #4f46e5;
}

/* Header Theme Button */
.header-theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.header-theme-btn:hover {
  background: var(--bg-surface-active);
  color: var(--pc-brand-indigo);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

/* Profile Auth Action Button (Dynamic Login vs Logout) */
.profile-auth-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-main), 'IRANSansXFaNum', sans-serif;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  outline: none;
  line-height: 1;
  vertical-align: middle;
}

#profile-auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  line-height: 1;
  flex-shrink: 0;
}

#profile-auth-icon svg {
  display: block;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
}

#btn-profile-auth-text {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-size: 12px;
  font-weight: 700;
  transform: translateY(0.5px);
}

/* 1. Login Mode (Clean Indigo Brand Accent - Modern and Welcoming) */
.profile-auth-action-btn.login-mode {
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.38);
  color: #818cf8;
}

.profile-auth-action-btn.login-mode:hover,
.profile-auth-action-btn.login-mode:active {
  background: #6366F1;
  border-color: #6366F1;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.32);
  transform: translateY(-1px);
}

/* 2. Logout Mode (Subtle Danger/Destructive Red) */
.profile-auth-action-btn.logout-mode {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.24);
  color: #ef4444;
}

.profile-auth-action-btn.logout-mode:hover,
.profile-auth-action-btn.logout-mode:active {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

/* Light Theme Overrides */
body.light-mode .profile-auth-action-btn.login-mode,
[data-theme="light"] .profile-auth-action-btn.login-mode {
  background: #EEF2FF;
  border-color: #C7D2FE;
  color: #4F46E5;
}

body.light-mode .profile-auth-action-btn.login-mode:hover,
[data-theme="light"] .profile-auth-action-btn.login-mode:hover {
  background: #4F46E5;
  color: #FFFFFF;
}

body.light-mode .profile-auth-action-btn.logout-mode,
[data-theme="light"] .profile-auth-action-btn.logout-mode {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #DC2626;
}

/* Account Unverified row & button in Profile */
.account-unverified-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.account-hint-text {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.auth-open-btn {
  width: 100%;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
}


/* Compact Minimalist Referral Card */
.referral-deluxe-item {
  overflow: hidden;
}

.referral-active-box,
.referral-compact-box {
  width: 100%;
  margin-top: 6px;
}

.referral-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-surface-raised);
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 12px;
  padding: 8px 12px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.referral-code-badge-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.referral-compact-label {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.referral-compact-code {
  font-family: monospace, var(--font-en);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  border: 1px dashed rgba(99, 102, 241, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
  direction: ltr;
  user-select: all;
}

.referral-icon-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.referral-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.14);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.referral-icon-btn:hover,
.referral-icon-btn:active {
  background: #6366F1;
  color: #FFFFFF;
  border-color: #6366F1;
  transform: translateY(-1px);
}

body.light-mode .referral-compact-row,
[data-theme="light"] .referral-compact-row {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

body.light-mode .referral-compact-code,
[data-theme="light"] .referral-compact-code {
  color: #4F46E5;
  background: #EEF2FF;
  border-color: #C7D2FE;
}

body.light-mode .referral-icon-btn,
[data-theme="light"] .referral-icon-btn {
  background: #EEF2FF;
  color: #4F46E5;
  border-color: #C7D2FE;
}

body.light-mode .referral-icon-btn:hover,
[data-theme="light"] .referral-icon-btn:hover {
  background: #4F46E5;
  color: #FFFFFF;
}

.referral-deluxe-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.03) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 14px;
  padding: 14px;
  width: 100%;
  box-sizing: border-box;
}

.referral-card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.referral-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.referral-pill-badge {
  background: rgba(16, 185, 129, 0.12);
  color: var(--text-accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.referral-code-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-raised);
  border: 1px dashed rgba(99, 102, 241, 0.35);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
}

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

.referral-code-text {
  font-family: monospace, var(--font-en);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--pc-brand-indigo);
  direction: ltr;
  user-select: all;
}

.referral-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.referral-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.referral-cta-btn.primary {
  background: linear-gradient(135deg, var(--pc-brand-indigo) 0%, #4338ca 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.referral-cta-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.referral-cta-btn.secondary {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.referral-cta-btn.secondary:hover {
  background: var(--bg-surface-active);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--pc-brand-indigo);
}

.referral-desc-hint {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin: 0;
  line-height: 1.55;
}

/* Responsive Input Row for Friend Referral */
.responsive-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.responsive-input-row input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  height: 48px;
  box-sizing: border-box;
}

.responsive-input-row button {
  flex-shrink: 0;
  min-height: 48px;
  height: 48px;
  padding: 0 20px;
}

@media (max-width: 380px) {
  .referral-buttons-row {
    grid-template-columns: 1fr;
  }
  .responsive-input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .responsive-input-row button {
    width: 100%;
  }
}

/* Auth / Login Dedicated Modal Sheet */
.auth-modal-sheet {
  max-width: 440px;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
}

.auth-header-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--pc-brand-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-modal-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.auth-modal-body {
  padding: 14px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-step-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.auth-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.auth-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-input-icon {
  position: absolute;
  right: 14px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.auth-text-input {
  width: 100%;
  height: 48px;
  padding: 0 42px 0 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13.5px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.auth-text-input.ltr-input {
  direction: ltr;
  text-align: left;
  font-family: monospace, var(--font-en);
}

.auth-text-input:focus {
  outline: none;
  border-color: var(--pc-brand-indigo);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-submit-btn {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pc-brand-indigo) 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
  transition: all 0.2s ease;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-legal-hint {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}

/* Step 2 Styles */
.auth-otp-target-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.auth-target-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.auth-target-label {
  font-size: 12px;
  color: var(--text-muted);
}

.auth-target-email {
  font-size: 13px;
  color: var(--pc-brand-indigo);
  direction: ltr;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-edit-email-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
  white-space: nowrap;
}

.auth-edit-email-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.auth-otp-input-wrap {
  width: 100%;
}

.auth-otp-input {
  width: 100%;
  height: 54px;
  border-radius: 14px;
  border: 2px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 8px;
  font-family: monospace, var(--font-en);
  direction: ltr;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.auth-otp-input:focus {
  outline: none;
  border-color: var(--pc-brand-indigo);
  background: var(--bg-surface);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.auth-field-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.45;
}

.auth-timer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 20px;
  min-height: 24px;
}

.auth-timer-text {
  font-size: 12px;
  color: var(--text-muted);
}

.auth-timer-text strong {
  color: var(--pc-brand-indigo);
  direction: ltr;
  display: inline-block;
  font-family: monospace, var(--font-en);
}

.auth-resend-btn {
  background: none;
  border: none;
  color: var(--pc-brand-indigo);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  padding: 2px 6px;
}

.compact-outline-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.compact-outline-btn:hover {
  border-color: var(--pc-brand-indigo);
  color: var(--pc-brand-indigo);
}

.mini-copy-btn {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.referrals-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
}

.referrals-stat-row strong {
  color: var(--text-main);
}

.ad-reward-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  color: #fff;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

/* ==========================================================================
   Modern Mobile Navigation Bar (Material 3 Capsule Pill Architecture)
   - Sleek horizontal capsule pill for active tab icon
   - Tight, cohesive spacing between icon and Persian label
   - High-contrast typography and subtle glassmorphic glow
   - Strictly zero dark overlays, zero notches, zero visual clipping
   ========================================================================== */

.floating-nav-bar {
  position: absolute !important;
  bottom: 8px !important;
  left: 10px !important;
  right: 10px !important;
  height: 72px !important;
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 60;
  overflow: hidden;
  transition: background var(--transition-normal), border var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

/* Button Track */
.nav-buttons-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 6px;
  position: relative;
  z-index: 3;
}

.nav-btn {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  padding: 4px 0;
  overflow: visible;
}

.nav-btn * {
  pointer-events: none;
}

/* Inactive Icon Box */
.nav-icon-box {
  position: relative;
  width: 44px;
  height: 28px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  transition: all 0.24s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.nav-svg {
  width: 20px;
  height: 20px;
  color: var(--text-dim);
  display: block;
  stroke-width: 1.8;
  transition: all 0.22s ease;
}

.nav-text {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-dim);
  line-height: 1.2;
  transition: all 0.22s ease;
}

/* ==========================================================================
   ACTIVE TAB STATE (Material 3 Horizontal Capsule Pill)
   ========================================================================== */
.nav-btn.active .nav-icon-box {
  width: 52px;
  height: 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22) 0%, rgba(14, 165, 233, 0.16) 100%) !important;
  border: 1px solid rgba(59, 130, 246, 0.40) !important;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.22) !important;
  transform: none !important;
}

.nav-btn.active .nav-svg {
  width: 20px;
  height: 20px;
  color: #3b82f6;
  stroke-width: 2.1;
  filter: drop-shadow(0 1px 4px rgba(37, 99, 235, 0.45));
}

.nav-btn.active .nav-text {
  color: var(--text-main);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: -0.1px;
}

/* Tactile press down feedback */
.nav-btn:active .nav-icon-box {
  transform: scale(0.95);
}

/* ==========================================================================
   Light Mode Overrides
   ========================================================================== */
body.light-mode .floating-nav-bar,
[data-theme="light"] .floating-nav-bar {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 36px -4px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

body.light-mode .nav-btn.active .nav-icon-box,
[data-theme="light"] .nav-btn.active .nav-icon-box {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%) !important;
  border: 1px solid rgba(37, 99, 235, 0.28) !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12) !important;
  transform: none !important;
}

body.light-mode .nav-btn.active .nav-svg,
[data-theme="light"] .nav-btn.active .nav-svg {
  color: #1D4ED8;
  stroke-width: 2.1;
  filter: drop-shadow(0 1px 3px rgba(37, 99, 235, 0.25));
}

body.light-mode .nav-btn.active .nav-text,
[data-theme="light"] .nav-btn.active .nav-text {
  color: #0F172A;
}

body.light-mode .nav-home-indicator,
[data-theme="light"] .nav-home-indicator {
  background: rgba(0, 0, 0, 0.22);
}

/* ==========================================================================
   Agent Builder (Coming Soon) View
   ========================================================================== */
.agent-coming-soon-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  margin-top: 16px;
  min-height: 280px;
}

.coming-soon-badge-wrap {
  margin-bottom: 20px;
}

.agent-hero-visual {
  position: relative;
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.agent-ambient-glow {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(6, 182, 212, 0.16) 50%, transparent 75%);
  filter: blur(14px);
  animation: splashHaloPulse 2.8s ease-in-out infinite;
}

.agent-icon-circle {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(6, 182, 212, 0.18) 100%);
  border: 1.5px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.22);
}

.agent-bot-svg {
  color: #818cf8;
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.4));
  animation: splashFloat 3s ease-in-out infinite;
}

.agent-content-block {
  margin-bottom: 0;
  width: 100%;
}

.agent-main-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.agent-status-badge-row {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.coming-soon-status-pill {
  display: inline-block;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #38bdf8;
  font-size: 13px;
  font-weight: 800;
  padding: 5px 18px;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
  letter-spacing: 0.5px;
}

.agent-description {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 300px;
  margin: 0 auto;
}

.agent-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 24px;
  text-align: right;
}

.agent-feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  transition: var(--transition-fast);
}

.feature-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-text-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.feature-text-col strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.feature-text-col span {
  font-size: 11.5px;
  color: var(--text-dim);
}

.agent-notify-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: var(--transition-fast);
}

.agent-notify-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

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

[data-theme="light"] .agent-icon-circle {
  background: linear-gradient(135deg, #e0e7ff 0%, #e0f2fe 100%);
  border-color: #c7d2fe;
}

[data-theme="light"] .agent-bot-svg {
  color: #4f46e5;
}

[data-theme="light"] .coming-soon-status-pill {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0284c7;
}

[data-theme="light"] .feature-icon-badge {
  background: #e0e7ff;
  color: #4f46e5;
}

/* ==========================================================================
   Modals & Bottom Sheets
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.modal-sheet {
  background: var(--bg-frame);
  width: 100%;
  max-width: 430px;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom, 0px)) 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-svg {
  color: var(--pc-brand-indigo);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 800;
}

.modal-close-btn {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--bg-surface-raised);
  color: var(--text-main);
}

.shop-notice {
  font-size: 11.5px;
  color: var(--text-muted);
}

.package-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  margin-top: 6px;
}

.package-card.popular {
  border-color: var(--pc-brand-indigo);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
}

.popular-ribbon {
  position: absolute;
  top: 5px;
  left: 5px;
  background: var(--pc-brand-indigo);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  line-height: 1.35;
}

.pkg-badge {
  font-size: 12px;
  font-weight: 700;
}

.pkg-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pkg-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pkg-tier-svg {
  color: var(--pc-brand-indigo);
  flex-shrink: 0;
}

.pkg-credits {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.pkg-price {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-accent-blue);
  line-height: 1.3;
  margin-top: 1px;
}

.pkg-unit-rate {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}

.pkg-discount {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-accent-emerald);
  line-height: 1.3;
}

.pkg-buy-btn {
  background: var(--pc-brand-gradient);
  border: none;
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pkg-buy-btn:hover {
  transform: scale(1.05);
}

.shop-discount-trigger-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-dim);
}

.text-link-btn {
  background: none;
  border: none;
  color: var(--pc-brand-indigo);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.text-link-btn:hover {
  color: var(--pc-brand-violet);
}

/* Discount Code Modal */
.discount-modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.discount-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.discount-input {
  flex: 1;
  min-height: 48px;
  height: 48px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.discount-input:focus {
  border-color: var(--pc-brand-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.discount-apply-btn {
  min-height: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.discount-apply-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.discount-feedback-msg {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.5;
}

.discount-feedback-msg.success {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.discount-feedback-msg.error {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.discount-hints-box {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.hints-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  display: block;
  margin-bottom: 8px;
}

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

.hint-chip {
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-fast);
}

.hint-chip:hover {
  border-color: var(--pc-brand-indigo);
  color: var(--pc-brand-indigo);
}

/* Payment Sheet */
.market-brand-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--text-accent-emerald);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
}

.payment-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
}

.payment-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.payment-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Toast */
.toast-notification {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  z-index: 1000;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90%;
  text-align: center;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   Creative Initial App Splash / Welcome Loading Screen (Advanced Motion)
   ========================================================================== */
.initial-splash-screen {
  position: absolute;
  inset: 0;
  z-index: 9999;
  background: var(--bg-frame);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 24px 28px;
  overflow: hidden;
  user-select: none;
  cursor: pointer;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.5s ease;
}

.initial-splash-screen.splash-fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
  visibility: hidden;
}

/* Skip Chip Button in Corner */
.splash-skip-chip {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1;
  transition: var(--transition-fast);
}

.splash-skip-chip:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-main);
  border-color: rgba(37, 99, 235, 0.5);
  transform: scale(1.04);
}

.skip-chip-svg {
  flex-shrink: 0;
  display: block;
}

/* Ambient Pulse Background */
.splash-ambient-bg {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28) 0%, rgba(6, 182, 212, 0.16) 45%, transparent 70%);
  filter: blur(48px);
  pointer-events: none;
  animation: splashAmbientPulse 4s ease-in-out infinite alternate;
}

@keyframes splashAmbientPulse {
  0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* Cosmic Twinkling Stars */
.splash-stars-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.splash-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #a5b4fc;
  box-shadow: 0 0 6px #818cf8;
  animation: splashStarTwinkle 2.5s infinite ease-in-out;
}

.splash-star.s1 { top: 16%; right: 18%; animation-delay: 0.2s; }
.splash-star.s2 { top: 38%; left: 14%; animation-delay: 0.8s; }
.splash-star.s3 { bottom: 28%; right: 16%; animation-delay: 1.4s; }
.splash-star.s4 { bottom: 18%; left: 20%; animation-delay: 2s; }

@keyframes splashStarTwinkle {
  0%, 100% { transform: scale(0.6); opacity: 0.3; }
  50% { transform: scale(1.4); opacity: 1; }
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: auto;
  margin-bottom: auto;
  width: 100%;
  max-width: 310px;
  z-index: 2;
}

/* Dynamic Orbit Rings & Logo Hub */
.splash-logo-container {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.splash-orbit-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.splash-orbit-ring.primary {
  width: 118px;
  height: 118px;
  border: 1.5px dashed rgba(37, 99, 235, 0.45);
  animation: splashOrbitRotate 12s linear infinite;
}

.splash-orbit-ring.secondary {
  width: 138px;
  height: 138px;
  border: 1px dotted rgba(6, 182, 212, 0.35);
  animation: splashOrbitRotate 8s linear infinite reverse;
}

@keyframes splashOrbitRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.orbit-satellite {
  position: absolute;
  border-radius: 50%;
}

.orbit-satellite.s-primary {
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
}

.orbit-satellite.s-secondary {
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  background: #06b6d4;
  box-shadow: 0 0 8px #06b6d4;
}

.splash-glow-halo {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.45) 0%, rgba(56, 189, 248, 0.2) 60%, transparent 80%);
  filter: blur(14px);
  animation: splashHaloPulse 2.4s ease-in-out infinite;
}

@keyframes splashHaloPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

.splash-logo-img,
.splash-logo-svg {
  width: 84px;
  height: 84px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  border-radius: 20px;
  filter: drop-shadow(0 10px 28px rgba(37, 99, 235, 0.5));
  animation: splashLogoEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             splashLogoFloat 3s ease-in-out infinite 0.7s;
}

@keyframes splashLogoEntrance {
  0% {
    transform: scale(0.65) rotate(-6deg);
    opacity: 0;
    filter: blur(10px);
  }
  60% {
    transform: scale(1.08) rotate(2deg);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes splashLogoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.splash-text-block {
  margin-bottom: 30px;
}

.splash-welcome-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.32);
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 8px;
  animation: splashPillDrop 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes splashPillDrop {
  0% { transform: translateY(-8px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.splash-app-title {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  background: linear-gradient(90deg, #60a5fa 0%, #38bdf8 35%, #93c5fd 70%, #2563eb 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: splashTitleShimmer 4s linear infinite;
}

@keyframes splashTitleShimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

[data-theme="light"] .splash-app-title {
  background: linear-gradient(90deg, #1d4ed8 0%, #0284c7 35%, #2563eb 70%, #1e40af 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash-tagline {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Dynamic loader & status */
.splash-loader-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.splash-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.splash-progress-bar {
  width: 15%;
  height: 100%;
  background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 40%, #06b6d4 100%);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.7);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: splashBarFill 2.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes splashBarFill {
  0% {
    width: 12%;
  }
  25% {
    width: 40%;
  }
  60% {
    width: 75%;
  }
  85% {
    width: 92%;
  }
  100% {
    width: 100%;
  }
}

.splash-progress-shimmer {
  position: absolute;
  top: 0;
  left: -60px;
  width: 60px;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.7) 50%, transparent 100%);
  animation: splashShimmerSweep 1.5s infinite linear;
}

@keyframes splashShimmerSweep {
  0% { left: -60px; }
  100% { left: 100%; }
}

.splash-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.splash-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #06b6d4;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.85);
  animation: splashDotPulse 1.2s infinite ease-in-out;
}

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

.splash-status-text {
  transition: opacity 0.2s ease;
}

.splash-footer-note {
  z-index: 2;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.2px;
  opacity: 0.85;
  padding-bottom: 8px;
}

/* ==========================================================================
   Full Responsiveness & Mobile Device Adaptations (320px - 768px+)
   ========================================================================== */

/* Narrow Mobile Screens (<= 380px: Galaxy S/A, iPhone SE/Mini) */
@media (max-width: 380px) {
  .app-content {
    padding: 6px 10px 84px 10px !important;
  }

  /* nav bar height preserved at 72px */

  .nav-btn.active .nav-icon-box {
    width: 48px;
    height: 26px;
    border-radius: 13px;
    transform: none !important;
  }

  .nav-text {
    font-size: 11.5px;
  }

  .minimal-wallet-card {
    padding: 14px 14px;
    gap: 12px;
  }

  .modal-sheet {
    padding: 14px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }

  .agent-coming-soon-card {
    padding: 32px 16px;
  }

  .status-bar {
    padding: 0 12px;
  }
}

/* Ultra Narrow Screens (<= 330px: Older Devices) */
@media (max-width: 330px) {
  .floating-nav-bar {
    left: 6px;
    right: 6px;
    height: 72px !important;
    bottom: 4px !important;
  }

  .nav-btn.active .nav-icon-box {
    width: 44px;
    height: 25px;
    border-radius: 12px;
  }

  .nav-text {
    font-size: 12px;
  }

  .nav-svg {
    width: 18px;
    height: 18px;
  }
}

/* Short Viewports & Mobile Landscape (<= 680px height) */
@media (max-height: 680px) {
  .mobile-frame-container {
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    margin: 0;
  }

  .app-content {
    padding-bottom: 64px !important;
  }

  /* nav bar bottom preserved at 4px */

  .modal-sheet {
    max-height: 90vh;
    max-height: 90dvh;
  }
}

/* ==========================================================================
   14. Vague Single-Question Step (4-Step Flow for Ambiguous Inputs)
   ========================================================================== */
.vague-prompt-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px dashed rgba(59, 130, 246, 0.35);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.vague-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-accent-blue);
  background: rgba(37, 99, 235, 0.16);
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.vague-prompt-preview {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  word-break: break-word;
}

.vague-single-question-card {
  background: var(--bg-card, #131722);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.vague-q-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.vague-q-icon {
  font-size: 18px;
  line-height: 1;
}

.vague-q-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.45;
  margin: 0;
}

.vague-q-hint {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 14px;
}

.vague-input-wrap {
  width: 100%;
}

.vague-elaboration-textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 12px 14px;
  resize: none;
  outline: none;
  direction: rtl;
  text-align: right;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.vague-elaboration-textarea:focus {
  border-color: #2563eb;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.vague-elaboration-textarea::placeholder {
  color: var(--text-dim);
  font-size: 12.5px;
}

/* =============================================================================
   Notifications System & User Identifier Styles (Version 1.1)
   ============================================================================= */

.notif-btn {
  position: relative;
}

.notif-dot {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
  border: 1.5px solid var(--bg-frame);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
  animation: notifPulse 2s infinite;
}

.notif-dot.hidden {
  display: none !important;
}

@keyframes notifPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.notif-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px 2px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  transition: all var(--transition-fast);
  position: relative;
}

.notif-item.unread {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.08);
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  top: 14px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pc-brand-indigo);
}

.notif-icon-circle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--pc-brand-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.notif-message {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

.notif-time-stamp {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-dim);
  margin-top: 3px;
  direction: ltr;
  text-align: left;
}

.notif-empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.notif-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--text-muted);
}

/* User Unique Identifier Tag */
.user-id-chip {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-accent-blue);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  direction: ltr;
}

.user-id-chip.verified {
  color: #10B981;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   SOLID / FILLED ICONS ON HOVER & SELECT (ACTIVE)
   ========================================================================== */

/* 1. Bottom Navigation Bar Icons (Home, Agent, Profile) */
.nav-btn .nav-svg path,
.nav-btn .nav-svg rect,
.nav-btn .nav-svg circle {
  transition: fill 0.2s ease, stroke 0.2s ease;
}

/* Sparkles (Home) Fill */
.nav-btn:hover .nav-svg path,
.nav-btn.active .nav-svg path {
  fill: currentColor !important;
}

/* Robot Bot (Agent) Fill with Inverted Eyes & Mouth */
.nav-btn:hover .nav-svg rect,
.nav-btn.active .nav-svg rect {
  fill: currentColor !important;
}
.nav-btn:hover .nav-svg circle,
.nav-btn.active .nav-svg circle {
  fill: var(--bg-surface-raised, #0f172a) !important;
  stroke: var(--bg-surface-raised, #0f172a) !important;
}
.nav-btn:hover .nav-svg path[d="M9 17h6"],
.nav-btn.active .nav-svg path[d="M9 17h6"] {
  stroke: var(--bg-surface-raised, #0f172a) !important;
  stroke-width: 2.2px !important;
}

/* User (Profile) Fill (Head circle and Torso path) */
.nav-btn:hover .nav-svg circle,
.nav-btn.active .nav-svg circle,
.nav-btn:hover .nav-svg path,
.nav-btn.active .nav-svg path {
  fill: currentColor !important;
}

/* 2. Header Theme Button (Sun / Moon) */
.header-theme-btn:hover .theme-svg.sun-svg circle,
.header-theme-btn:active .theme-svg.sun-svg circle {
  fill: currentColor !important;
}
.header-theme-btn:hover .theme-svg.moon-svg path,
.header-theme-btn:active .theme-svg.moon-svg path {
  fill: currentColor !important;
}

/* 3. Header Notification Bell: Removed for v1.0.0 */

/* 4. Wallet Gem Diamond */
.wallet-badge:hover .wallet-icon-svg path,
.wallet-badge:active .wallet-icon-svg path {
  fill: currentColor !important;
}

/* 5. User Avatar: Static icon with no solid state */

/* 6. Action Button Icons (Edit Username, Auth In/Out) */
.icon-btn-edit:hover svg path {
  fill: currentColor !important;
}
.profile-auth-action-btn:hover svg path {
  fill: currentColor !important;
}

/* 7. List Item & Non-interactive Icons: Pure static outline, strictly no hover/active solid fill */
.item-svg,
.item-icon-wrap .item-svg,
.minimal-list-item .item-svg,
.minimal-list-item:hover .item-svg,
.minimal-list-item:active .item-svg {
  fill: none !important;
}
.minimal-list-item .item-svg path,
.minimal-list-item .item-svg circle,
.minimal-list-item .item-svg rect,
.minimal-list-item .item-svg line,
.minimal-list-item .item-svg polyline,
.minimal-list-item:hover .item-svg path,
.minimal-list-item:hover .item-svg circle,
.minimal-list-item:hover .item-svg rect,
.minimal-list-item:hover .item-svg line,
.minimal-list-item:hover .item-svg polyline,
.minimal-list-item:active .item-svg path,
.minimal-list-item:active .item-svg circle,
.minimal-list-item:active .item-svg rect,
.minimal-list-item:active .item-svg line,
.minimal-list-item:active .item-svg polyline {
  fill: none !important;
}

/* 8. Discount Tag Button */
#btn-open-discount:hover svg path {
  fill: currentColor !important;
}

/* 9. Idea Chips in Home View */
.idea-chip:hover svg path,
.idea-chip:hover svg polygon {
  fill: currentColor !important;
}

/* 10. Modal Close Buttons */
.modal-close-btn:hover svg path,
.btn-close-notif:hover svg path {
  fill: currentColor !important;
}


/* ==========================================================================
   Prompt History Accordion & List (Profile View)
   ========================================================================== */
.prompt-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.history-empty-state {
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: center;
  padding: 18px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
}

.history-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.history-item:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.04);
}

.history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-tool-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-accent-blue);
  background: rgba(37, 99, 235, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.history-time {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-en);
}

.history-prompt-preview {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.6;
  text-align: start;
  font-family: var(--font-fa);
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-height: 3.2em;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.btn-copy-history {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy-history:hover {
  color: #2563eb;
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

.icon-btn-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  transition: transform var(--transition-fast), color var(--transition-fast);
}
.icon-btn-toggle:hover {
  color: var(--text-main);
}
.icon-btn-toggle.expanded {
  transform: rotate(-90deg);
}


/* ==========================================================================
   Rate & Support Modal Styles (v1.1)
   ========================================================================== */
.rate-modal-sheet {
  max-width: 420px;
  text-align: center;
  padding: 16px 18px 12px 18px;
}

.rate-modal-body {
  padding: 6px 10px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.rate-hero-illustration {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.rate-stars-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 2px;
}

.star-icon {
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.4));
  transition: transform 0.2s ease;
}

.star-icon.big {
  transform: scale(1.15);
  filter: drop-shadow(0 4px 14px rgba(245, 158, 11, 0.6));
}

.rate-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
  margin: 0;
}

.rate-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  margin-bottom: 2px;
}

.rate-primary-btn {
  width: 100%;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pc-brand-indigo, #6366f1) 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}

.rate-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.rate-primary-btn:active {
  transform: translateY(1px);
}

.rate-secondary-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  height: 38px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rate-secondary-btn:hover {
  background: var(--bg-surface-raised);
  color: var(--text-main);
}

/* ==========================================================================
   Feedback Modal Styles
   ========================================================================== */
.feedback-modal-sheet {
  max-width: 440px;
}

.feedback-modal-body {
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feedback-intro-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.feedback-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.feedback-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.feedback-categories-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feedback-cat-chip {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}

.feedback-cat-chip svg {
  display: block !important;
  flex-shrink: 0 !important;
  width: 14px !important;
  height: 14px !important;
}

.feedback-cat-chip span {
  display: inline-block !important;
  line-height: 1.2 !important;
}

.feedback-cat-chip:hover {
  border-color: var(--pc-brand-indigo);
  color: var(--text-main);
}

.feedback-cat-chip.active {
  background: rgba(99, 102, 241, 0.16);
  border-color: var(--pc-brand-indigo);
  color: var(--pc-brand-indigo);
  font-weight: 700;
}

.feedback-textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 90px;
  outline: none;
  box-sizing: border-box;
}

.feedback-textarea:focus {
  border-color: var(--pc-brand-indigo);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18);
}

.feedback-input {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.feedback-input:focus {
  border-color: var(--pc-brand-indigo);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18);
}

.feedback-submit-btn {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  background: var(--pc-brand-gradient);
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.feedback-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.feedback-submit-btn:active {
  transform: translateY(1px);
}

.feedback-status-msg {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  line-height: 1.4;
}

.feedback-status-msg.success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.feedback-status-msg.error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
