/* ==========================================================================
   تعریف کامل خانواده فونت PeydaWeb (وزن‌های 100 تا 900 مطابق نام فایل‌های پوشه)
   ========================================================================== */
@font-face {
  font-family: 'PeydaWeb';
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-Thin.eot');
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-Thin.eot?#iefix') format('embedded-opentype'),
       url('../../fonts/PeydaWeb/woff2/PeydaWeb-Thin.woff2') format('woff2'),
       url('../../fonts/PeydaWeb/woff/PeydaWeb-Thin.woff') format('woff');
}

@font-face {
  font-family: 'PeydaWeb';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('../../fonts/PeydaWeb/eot/peydaWeb-extralight.eot');
  src: url('../../fonts/PeydaWeb/eot/peydaWeb-extralight.eot?#iefix') format('embedded-opentype'),
       url('../../fonts/PeydaWeb/woff2/peydaWeb-extralight.woff2') format('woff2'),
       url('../../fonts/PeydaWeb/woff/peydaWeb-extralight.woff') format('woff');
}

@font-face {
  font-family: 'PeydaWeb';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../../fonts/PeydaWeb/eot/peydaWeb-light.eot');
  src: url('../../fonts/PeydaWeb/eot/peydaWeb-light.eot?#iefix') format('embedded-opentype'),
       url('../../fonts/PeydaWeb/woff2/peydaWeb-light.woff2') format('woff2'),
       url('../../fonts/PeydaWeb/woff/peydaWeb-light.woff') format('woff');
}

@font-face {
  font-family: 'PeydaWeb';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-Regular.eot');
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-Regular.eot?#iefix') format('embedded-opentype'),
       url('../../fonts/PeydaWeb/woff2/PeydaWeb-Regular.woff2') format('woff2'),
       url('../../fonts/PeydaWeb/woff/PeydaWeb-Regular.woff') format('woff');
}

@font-face {
  font-family: 'PeydaWeb';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-Medium.eot');
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-Medium.eot?#iefix') format('embedded-opentype'),
       url('../../fonts/PeydaWeb/woff2/PeydaWeb-Medium.woff2') format('woff2'),
       url('../../fonts/PeydaWeb/woff/PeydaWeb-Medium.woff') format('woff');
}

@font-face {
  font-family: 'PeydaWeb';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-SemiBold.eot');
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-SemiBold.eot?#iefix') format('embedded-opentype'),
       url('../../fonts/PeydaWeb/woff2/PeydaWeb-SemiBold.woff2') format('woff2'),
       url('../../fonts/PeydaWeb/woff/PeydaWeb-SemiBold.woff') format('woff');
}

@font-face {
  font-family: 'PeydaWeb';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-Bold.eot');
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-Bold.eot?#iefix') format('embedded-opentype'),
       url('../../fonts/PeydaWeb/woff2/PeydaWeb-Bold.woff2') format('woff2'),
       url('../../fonts/PeydaWeb/woff/PeydaWeb-Bold.woff') format('woff');
}

@font-face {
  font-family: 'PeydaWeb';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-ExtraBold.eot');
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-ExtraBold.eot?#iefix') format('embedded-opentype'),
       url('../../fonts/PeydaWeb/woff2/PeydaWeb-ExtraBold.woff2') format('woff2'),
       url('../../fonts/PeydaWeb/woff/PeydaWeb-ExtraBold.woff') format('woff');
}

@font-face {
  font-family: 'PeydaWeb';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-Black.eot');
  src: url('../../fonts/PeydaWeb/eot/PeydaWeb-Black.eot?#iefix') format('embedded-opentype'),
       url('../../fonts/PeydaWeb/woff2/PeydaWeb-Black.woff2') format('woff2'),
       url('../../fonts/PeydaWeb/woff/PeydaWeb-Black.woff') format('woff');
}

/* ==========================================================================
   متغیرهای رنگ و پوسته (Dark & Light Mode)
   ========================================================================== */
:root {
  --font-sans: 'PeydaWeb', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --bg-body: #0B0D10;
  --bg-surface: #12161C;
  --bg-surface-hover: #171C24;
  --bg-glass: rgba(11, 13, 16, 0.82);
  --bg-pill: rgba(255, 255, 255, 0.05);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  --accent: #10B981;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --accent-border: rgba(16, 185, 129, 0.28);
  --spotlight: rgba(255, 255, 255, 0.04);

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-card: 0 12px 32px -12px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] {
  --bg-body: #F5F7FA;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #F9FAFB;
  --bg-glass: rgba(245, 247, 250, 0.86);
  --bg-pill: rgba(15, 23, 42, 0.05);
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);

  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;

  --accent: #059669;
  --accent-soft: rgba(5, 150, 105, 0.10);
  --accent-border: rgba(5, 150, 105, 0.25);
  --spotlight: rgba(15, 23, 42, 0.03);

  --shadow-card: 0 10px 30px -12px rgba(15, 23, 42, 0.08);
}

/* ==========================================================================
   تنظیمات پایه
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
  background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
  background-size: 24px 24px;
}

button, a {
  font-family: inherit;
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   هدر بالایی
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  color: var(--text-primary);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
  text-align: right;
}

.brand-sub {
  font-size: 0.74rem;
  font-weight: 300;
  color: var(--text-secondary);
}

/* منوی دسکتاپ */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 4px;
  background: var(--bg-pill);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.nav-pill {
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.nav-pill:hover {
  color: var(--text-primary);
}

.nav-pill.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-clock {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulse 2.2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: transform 0.15s ease, border-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.icon-btn:active {
  transform: scale(0.93);
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

/* ==========================================================================
   کانتینر اصلی و نمای تب‌ها
   ========================================================================== */
.app-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px calc(96px + env(safe-area-inset-bottom));
}

.app-view {
  scroll-margin-top: 84px;
}

@media (max-width: 767px) {
  .app-view {
    display: none;
    animation: viewFadeIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .app-view.active {
    display: block;
  }

  .brand-sub {
    display: none;
  }
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   کارت‌ها
   ========================================================================== */
.spotlight-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.2s ease;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--spotlight),
    transparent 65%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card:hover {
  border-color: var(--border-strong);
}

/* ==========================================================================
   بخش هیرو (Hero Card)
   ========================================================================== */
.hero-card {
  padding: 26px 22px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 400;
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-muted);
  background: var(--bg-pill);
  padding: 4px 10px;
  border-radius: 8px;
}

/* تیتر اصلی با وزن Bold واقعی فونت PeydaWeb */
.hero-title {
  font-size: clamp(1.45rem, 3.8vw, 2.2rem);
  font-weight: 700;
  line-height: 1.48;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.hero-desc {
  font-size: 0.96rem;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 66ch;
  margin-bottom: 24px;
}

.hero-desc strong {
  font-weight: 700;
  color: var(--text-primary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px;
  border-radius: 13px;
  font-size: 0.88rem;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-body);
  font-weight: 500;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-secondary {
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 400;
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

/* پنل پیشرفت زیرساخت */
.progress-panel {
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.progress-percent {
  font-weight: 600;
  color: var(--accent);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-pill);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.milestones {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.milestone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.milestone.done .check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 600;
}

.milestone.current {
  color: var(--text-primary);
  font-weight: 500;
}

.spinner-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--accent-border);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* متریک‌های سریع */
.quick-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.metric-item {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-label {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-secondary);
}

.metric-value {
  font-size: 0.86rem;
  font-weight: 400;
}

.text-accent {
  color: var(--accent);
}

/* ==========================================================================
   بخش حوزه‌های تمرکز (Bento Grid)
   ========================================================================== */
.section-head {
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-secondary);
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.bento-card {
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

/* تیتر کارت‌ها با وزن SemiBold */
.card-title {
  font-size: 1.04rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.87rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 18px;
  flex-grow: 1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-secondary);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  padding: 3px 9px;
  border-radius: 7px;
}

/* ==========================================================================
   بخش ارتباط مستقیم
   ========================================================================== */
.contact-card {
  padding: 24px 20px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.contact-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: right;
  transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.contact-row:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

.contact-row:active {
  transform: scale(0.985);
}

.contact-row-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.contact-badge {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  color: var(--text-primary);
  flex-shrink: 0;
}

.contact-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-secondary);
}

.contact-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-chip {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.domain-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-muted);
}

.domain-footer strong {
  font-weight: 600;
}

/* ==========================================================================
   نوار ناوبری پایین موبایل
   ========================================================================== */
.mobile-dock {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 16px;
  right: 16px;
  z-index: 60;
  height: 64px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 400;
  transition: all 0.2s ease;
}

.dock-item:active {
  transform: scale(0.92);
}

.dock-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

/* ==========================================================================
   اعلان شناور (Toast)
   ========================================================================== */
.toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--bg-body);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
}

/* ==========================================================================
   چیدمان تبلت و دسکتاپ (768px به بالا)
   ========================================================================== */
@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }

  .mobile-dock {
    display: none;
  }

  .app-container {
    padding: 36px 24px 64px;
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .app-view {
    display: block !important;
  }

  .hero-card {
    padding: 40px 38px;
  }

  .milestones {
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-metrics {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 14px;
  }

  .metric-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .contact-card {
    padding: 32px 34px;
  }

  .contact-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .contact-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}