:root {
  --navy-900: #223437;
  --navy-950: #223437;
  --bg: #FAF9F7;
  --surface: #FAF9F7;
  --surface-alt: #FAF9F7;
  --text-muted: rgba(34, 52, 55, 0.65);
  --text-hint: rgba(34, 52, 55, 0.55);
  --border: #D9E2DA;
  --border-subtle: #D9E2DA;
  --accent: #295958;
  --accent-soft: rgba(244, 183, 64, 0.16);
  --accent-strong: #295958;
  --primary: #295958;
  --cta: #F4B740;
  --cta-soft: rgba(244, 183, 64, 0.16);
  --secondary: #8BB7A5;
  --secondary-soft: rgba(139, 183, 165, 0.25);
  --focus-ring: rgba(41, 89, 88, 0.25);
  --success: #295958;
  --error: #295958;
  --warning: #F4B740;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 8px 24px rgba(34, 52, 55, 0.06);
  --shadow: 0 18px 60px rgba(34, 52, 55, 0.10);
  --shadow-soft: 0 16px 40px rgba(34, 52, 55, 0.08);
  --text-strong: #223437;
  --placeholder: rgba(34, 52, 55, 0.55);
  --chip: rgba(139, 183, 165, 0.25);
}

.page-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}

.page-card {
  background: radial-gradient(circle at 0 0, rgba(41, 89, 88, 0.06), transparent 45%), var(--surface);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 22px 60px rgba(34, 52, 55, 0.08);
  padding: 24px 24px 20px;
}

.page-card-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: flex-start;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 16px 0;
}

.page-body {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-strong);
}

.page-body p {
  margin: 0 0 10px 0;
}

.page-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.page-badge {
  flex: 0 0 auto;
  min-width: 120px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-side-panel {
  border-radius: 18px;
  background: var(--secondary);
  color: var(--text-strong);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px rgba(34, 52, 55, 0.12);
}

.page-side-title {
  font-size: 15px;
  font-weight: 600;
}

.page-side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.page-side-item span.label {
  color: var(--text-muted);
}

.page-side-item a {
  color: var(--primary);
  text-decoration: none;
}

.page-side-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--cta);
  background: var(--cta);
  color: var(--navy-900);
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.page-side-cta:hover {
  opacity: 0.9;
}

.page-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.page-section-card {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 14px;
}

.page-section-title {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 6px 0;
}

.page-section-text {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.page-footer-min {
  max-width: 1040px;
  margin: 0 auto 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.page-footer-min-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-footer-min-links a {
  text-decoration: none;
  color: inherit;
}

body {
  display: block;
  min-height: 100vh;
  margin: 0;
  font-family: "IRANSansX", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: radial-gradient(circle at 10% 20%, rgba(41, 89, 88, 0.08), transparent 35%), var(--bg);
  color: var(--text-strong);
}

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

/* لایه‌بندی صفحات ورود / پیگیری (کارت وسط صفحه) */
body.login-layout {
  display: flex;
  flex-direction: column;
}

body.login-layout .login-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  margin: 24px auto 32px;
}

/* هدر مشترک با صفحه اصلی */
.app-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 8px 0 4px;
}

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

.app-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

.app-brand-title {
  font-size: 18px;
  font-weight: 600;
}

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

.app-brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.subtle-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--accent-strong);
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.1s ease;
  position: relative;
  overflow: hidden;
}

.subtle-btn::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at var(--hover-x, 50%) var(--hover-y, 50%), rgba(41,89,88,0.28), transparent 55%);
  opacity: 0;
  transition: opacity 0.15s ease-out;
  pointer-events: none;
}

.subtle-btn.subtle-hovering::after {
  opacity: 1;
}

.subtle-btn:hover {
  background: var(--surface);
  border-color: var(--accent-strong);
  box-shadow:
    0 0 0 1px rgba(41,89,88,0.35),
    0 6px 16px rgba(21, 48, 46, 0.14);
  color: var(--accent-strong);
}

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

.desktop-only {
  display: inline-flex;
}

/* فوتر مشابه صفحه اصلی */
.app-footer {
  margin-top: 32px;
  padding: 24px 0 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.footer-col-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--navy-900);
}

.footer-brand-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.footer-brand-header img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.footer-brand-text {
  font-size: 12px;
  line-height: 1.8;
}

.footer-brand-more {
  margin-top: 4px;
  font-size: 12px;
}

.footer-brand-text a,
.footer-brand-more a,
.footer-bottom a {
  color: var(--cta) !important;
  text-decoration: none !important;
  font-weight: 600;
}

.footer-links-column {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-links-column a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
}

.footer-links-column a:hover {
  color: var(--primary);
}

.footer-contact-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--text-strong);
  font-weight: 500;
  text-decoration: none;
  margin-top: 8px;
}

.footer-social-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.footer-social-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  cursor: pointer;
}

/* بهبود اندازه Tap Target در موبایل/تاچ (Lighthouse) */
@media (max-width: 768px), (pointer: coarse) {
  .subtle-btn,
  .footer-contact-email,
  .footer-links-column a,
  .page-side-cta {
    min-height: 44px;
  }

  .subtle-btn {
    min-width: 44px;
  }

  .footer-social-btn {
    width: 44px;
    height: 44px;
  }
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-badge {
  flex: 0 0 auto;
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-bottom {
  border-top: 1px solid rgba(217, 226, 218, 0.8);
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 11px;
}

.footer-bottom-cities span {
  opacity: 0.8;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(206, 218, 211, 0.65);
  color: var(--navy-900);
}

.badge.success {
  background: rgba(41, 89, 88, 0.12);
  color: var(--accent-strong);
}

.badge.warning {
  background: var(--cta-soft);
  color: var(--navy-900);
}

.badge.info {
  background: var(--secondary-soft);
  color: var(--accent-strong);
}

@media (max-width: 768px) {
  .app-shell {
    padding-bottom: 88px;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .desktop-only {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-card-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-card {
    padding: 18px 16px 16px;
  }
}
