/* ============================================
   AIKALAND - استایل کامل و یکپارچه با Bottom Navigation
   ============================================ */

/* === فونت === */
@font-face {
  font-family: "YekanBakh";
  src: url("assets/fonts/YekanBakh-Regular.woff2") format("woff2"),
       url("assets/fonts/YekanBakh-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "YekanBakh";
  src: url("assets/fonts/YekanBakh-Bold.woff2") format("woff2"),
       url("assets/fonts/YekanBakh-Bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

/* === متغیرها === */
:root {
  --primary: #1e2a78;
  --secondary: #2563eb;
  --accent: #10b981;
  --purple: #7c3aed;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #111827;
  --muted: #667085;
  --border: #e5e7eb;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow: 0 18px 45px rgba(30, 42, 120, 0.12);
  --shadow-soft: 0 8px 22px rgba(30, 42, 120, 0.07);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  
  /* Bottom Navigation */
  --nav-height: 72px;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-icon-size: 24px;
  --nav-label-size: 10px;
}

/* === ریست === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  font-family: "YekanBakh", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(124, 58, 237, 0.12), transparent 34%),
    linear-gradient(180deg, #eef2ff 0%, #f8fafc 45%, #ffffff 100%);
  color: var(--text);
}

button, input, select, textarea {
  font-family: inherit;
}

/* === کانتینر اصلی === */
.app {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 14px 26px;
  overflow: hidden;
  position: relative;
}

/* وقتی Bottom Navigation داریم */
.app.has-bottom-nav {
  padding-bottom: calc(var(--nav-height) + 20px);
}

/* === هدر عمومی === */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(30, 42, 120, 0.12);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--primary);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: 0.2s ease;
}

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

.header-logo {
  height: 42px;
  max-width: 150px;
  object-fit: contain;
}

/* === هدر صفحه اصلی (index.html) === */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.pill {
  border: 1px solid rgba(30, 42, 120, 0.12);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* === صفحه اصلی - Hero === */
.hero {
  text-align: center;
  padding: 8px 2px 0;
  position: relative;
  z-index: 1;
}

.main-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 15px auto;
}

.main-logo img {
  max-width: 260px;
  height: auto;
  object-fit: contain;
}

h1 {
  margin-top: 5px;
  font-size: clamp(28px, 8vw, 42px);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: -1px;
}

h1 span {
  color: var(--secondary);
}

.subtitle {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 2;
  font-weight: 600;
}

.hero-image-wrap {
  margin: 24px auto 0;
  height: 230px;
  position: relative;
  display: grid;
  place-items: center;
}

.hero-image {
  width: 100%;
  max-width: 390px;
  height: 220px;
  object-fit: cover;
  object-position: center;
  opacity: 0.98;
  border-radius: 28px;
  display: block;
}

.float-badge {
  position: absolute;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 18px 35px rgba(30, 42, 120, 0.18);
  animation: float 3s ease-in-out infinite;
}

.float-badge.one {
  top: 38px;
  right: 58px;
  background: linear-gradient(135deg, var(--purple), var(--secondary));
}

.float-badge.two {
  top: 70px;
  left: 54px;
  background: linear-gradient(135deg, var(--accent), #34d399);
  animation-delay: 0.35s;
}

.float-badge.three {
  bottom: 28px;
  left: 96px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  animation-delay: 0.7s;
}

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

/* === پنل اصلی === */
.panel {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-xl);
  padding: 24px 14px 18px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 3;
}

.panel-sm {
  border-radius: var(--radius-lg);
  padding: 18px 14px;
}

/* === کارت‌های نقش === */
.roles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
  transition: 0.25s ease;
}

.role-card:hover,
.role-card.active {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.14);
}

.role-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: 0 0 auto;
  box-shadow: 0 12px 24px rgba(30, 42, 120, 0.18);
}

.office .icon-circle {
  background: linear-gradient(135deg, var(--purple), #9333ea);
}

.consultant .icon-circle {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.client .icon-circle {
  background: linear-gradient(135deg, var(--accent), #34d399);
}

.role-card h2 {
  font-size: 17px;
  font-weight: 900;
}

.role-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
  margin-bottom: 12px;
}

.features {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.features li {
  color: #475467;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.features svg {
  color: var(--secondary);
  flex: 0 0 auto;
}

.client .features svg {
  color: var(--accent);
}

.office .features svg {
  color: var(--purple);
}

.btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.25s ease;
}

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

.btn-office {
  background: linear-gradient(135deg, var(--purple), #9333ea);
}

.btn-consultant {
  background: linear-gradient(135deg, var(--secondary), #4f46e5);
}

.btn-client {
  background: linear-gradient(135deg, var(--accent), #22c55e);
}

/* === بخش اعتماد === */
.trust-box {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.trust-item {
  text-align: center;
  padding: 8px 4px;
}

.trust-item svg {
  color: var(--primary);
  margin-bottom: 6px;
}

.trust-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.trust-item span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  display: block;
}

/* === ورود === */
.login-area {
  text-align: center;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-btn {
  margin-top: 10px;
  height: 46px;
  min-width: 190px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--secondary);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.09);
}

/* === صفحات داخلی - Hero Card === */
.hero-card {
  background: linear-gradient(135deg, rgba(30, 42, 120, 0.98), rgba(37, 99, 235, 0.92));
  color: #fff;
  border-radius: 32px;
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.28);
  left: -70px;
  top: -50px;
}

.hero-badge {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.hero-desc {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.9;
  position: relative;
  z-index: 1;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 18px;
}

.section-title::before,
.section-title::after {
  content: "";
  width: 42px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary));
}

.section-title::after {
  background: linear-gradient(90deg, var(--secondary), transparent);
}

/* === فرم‌ها === */
.form-grid {
  display: grid;
  gap: 13px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 13px;
  font-weight: 800;
  color: #344054;
}

.input-wrap {
  min-height: 52px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04);
}

.input-wrap svg {
  color: var(--secondary);
  flex: 0 0 auto;
}

.input-wrap input,
.input-wrap select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  min-width: 0;
}

.input-wrap select {
  appearance: none;
}

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

.hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

/* === دکمه‌ها === */
.primary-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--secondary), #4f46e5);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
  margin-top: 4px;
}

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

.secondary-btn {
  width: 100%;
  height: 48px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.inline-link {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 900;
}

.bottom-note {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* === استپ‌ها === */
.step-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--border);
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.1);
  color: var(--secondary);
  font-weight: 900;
  font-size: 13px;
}

.step-item strong {
  font-size: 13px;
}

.step-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

/* === Bottom Navigation === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 480px);
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(30, 42, 120, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px 6px;
  z-index: 100;
  box-shadow: 0 -8px 30px rgba(30, 42, 120, 0.08);
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--muted);
  transition: 0.2s ease;
  position: relative;
  min-width: 50px;
}

.nav-item svg {
  width: var(--nav-icon-size);
  height: var(--nav-icon-size);
  transition: 0.2s ease;
}

.nav-item span {
  font-size: var(--nav-label-size);
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-item.active {
  color: var(--secondary);
}

.nav-item.active svg {
  color: var(--secondary);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--secondary);
  border-radius: 999px;
}

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

/* === توست === */
.toast {
  position: fixed;
  right: 50%;
  bottom: calc(var(--nav-height) + 16px);
  transform: translateX(50%) translateY(28px);
  width: min(90%, 420px);
  padding: 14px 16px;
  background: #111827;
  color: #fff;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 150;
  text-align: center;
}

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

/* === رسپانسیو === */
@media (max-width: 420px) {
  .app {
    padding: 12px 10px 22px;
  }
  
  .app.has-bottom-nav {
    padding-bottom: calc(var(--nav-height) + 16px);
  }

  .hero-card {
    padding: 18px;
    border-radius: 28px;
  }

  .hero-title {
    font-size: 21px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 16px 12px;
  }

  .panel-sm {
    padding: 14px 10px;
  }

  .main-logo img {
    max-width: 200px;
  }

  .float-badge {
    width: 46px;
    height: 46px;
    border-radius: 15px 15px 15px 4px;
  }

  .float-badge.one {
    top: 28px;
    right: 42px;
  }

  .float-badge.two {
    top: 58px;
    left: 36px;
  }

  .float-badge.three {
    bottom: 22px;
    left: 72px;
  }

  .trust-box {
    grid-template-columns: 1fr 1fr;
    border-radius: 24px;
  }
  
  .bottom-nav {
    height: 62px;
    padding: 0 4px 4px;
  }
  
  .nav-item {
    padding: 4px 8px;
    min-width: 40px;
  }
  
  .nav-item svg {
    width: 20px;
    height: 20px;
  }
  
  .nav-item span {
    font-size: 9px;
  }
}