@font-face {
  font-family: 'IRANSans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/app/assets/fonts/IRANSans/iransansweb.woff2') format('woff2'),
       url('/app/assets/fonts/IRANSans/iransansweb.woff') format('woff');
}

@font-face {
  font-family: 'IRANSans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/app/assets/fonts/IRANSans/iransansweb.woff2') format('woff2'),
       url('/app/assets/fonts/IRANSans/iransansweb.woff') format('woff');
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/app/assets/fonts/material-symbols-outlined.ttf') format('truetype');
}

:root {
  color-scheme: light;
  --bg-base: #f6f6f8;
  --bg-gradient: radial-gradient(110% 160% at 85% 0%, rgba(249, 115, 22, 0.12), rgba(249, 115, 22, 0) 55%), linear-gradient(180deg, #f9fafc 0%, #f2f4f8 18%, #ffffff 48%, #f3f6fb 100%);
  --card-bg: rgba(255, 255, 255, 0.78);
  --card-border: rgba(15, 23, 42, 0.08);
  --ink-900: #0d121b;
  --muted-600: #6c7a93;
  --surface-strong: #0d121b;
  --surface-soft: rgba(255, 255, 255, 0.8);
  --field-bg: rgba(255, 255, 255, 0.84);
  --field-border: rgba(13, 18, 27, 0.14);
  --field-text: #0d121b;
  --field-placeholder: #8aa0c7;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg-base: #070d18;
  --bg-gradient: radial-gradient(130% 170% at 92% 0%, rgba(249, 115, 22, 0.18), rgba(249, 115, 22, 0) 52%), linear-gradient(180deg, #0a1220 0%, #081121 38%, #070d18 100%);
  --card-bg: rgba(13, 22, 38, 0.8);
  --card-border: rgba(148, 163, 184, 0.2);
  --ink-900: #e6edf8;
  --muted-600: #9eb0d2;
  --surface-strong: #1f2937;
  --surface-soft: rgba(15, 23, 42, 0.78);
  --field-bg: rgba(13, 22, 38, 0.88);
  --field-border: rgba(148, 163, 184, 0.32);
  --field-text: #e6edf8;
  --field-placeholder: #9eb0d2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

main[data-page-root] {
  overflow-x: clip;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
}

body {
  font-family: IRANSans, Tahoma, "Segoe UI", Arial, sans-serif;
  background: var(--bg-gradient);
  color: var(--ink-900);
  min-height: 100vh;
  position: relative;
}

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(600px 480px at 95% -10%, rgba(249, 115, 22, 0.25), transparent 65%);
  opacity: 0.85;
  z-index: -2;
}

html[data-theme='dark'] body::before {
  background: radial-gradient(640px 520px at 95% -8%, rgba(249, 115, 22, 0.22), transparent 68%);
  opacity: 0.62;
}

.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1.5rem;
  box-shadow: 0 24px 60px -30px rgba(8, 15, 31, 0.35);
  backdrop-filter: blur(18px);
}

html[data-theme='dark'] .glass-card {
  box-shadow: 0 26px 64px -36px rgba(2, 6, 23, 0.95);
}

.pill {
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.08);
  color: #ea580c;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-wrap-mode: nowrap;
}

html[data-theme='dark'] .pill {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
}

.btn-primary-modern {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  border-radius: 1rem;
  font-weight: 700;
  box-shadow: 0 14px 30px -18px rgba(249, 115, 22, 0.75);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  text-wrap-mode: nowrap;
}

.btn-primary-modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 36px -18px rgba(234, 88, 12, 0.6);
  filter: brightness(1.02);
}

.btn-outline-modern {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(13, 18, 27, 0.12);
  color: var(--ink-900);
  font-weight: 600;
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
  text-wrap-mode: nowrap;
}

html[data-theme='dark'] .btn-outline-modern {
  border-color: rgba(148, 163, 184, 0.38);
  color: #e6edf8;
  background: rgba(15, 23, 42, 0.5);
}

.btn-outline-modern:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.35);
  color: #ea580c;
  background: rgba(249, 115, 22, 0.06);
}

.cart-remove-btn {
  border-color: rgba(148, 163, 184, 0.38) !important;
  background: rgba(248, 250, 252, 0.95) !important;
  color: #334155 !important;
}

.cart-remove-btn:hover {
  border-color: rgba(251, 113, 133, 0.5) !important;
  background: rgba(254, 242, 242, 0.95) !important;
  color: #e11d48 !important;
}

html[data-theme='dark'] .cart-remove-btn {
  border-color: rgba(148, 163, 184, 0.42) !important;
  background: rgba(30, 41, 59, 0.72) !important;
  color: #dbe7ff !important;
}

html[data-theme='dark'] .cart-remove-btn:hover {
  border-color: rgba(251, 113, 133, 0.62) !important;
  background: rgba(69, 10, 28, 0.6) !important;
  color: #fecdd3 !important;
}

.theme-toggle {
  flex-shrink: 0;
}

html[data-theme='dark'] .theme-toggle {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
}

.btn-primary-modern:disabled,
.btn-outline-modern:disabled,
.btn-primary-modern.is-loading,
.btn-outline-modern.is-loading {
  opacity: 0.78;
  cursor: wait;
  pointer-events: none;
  transform: none !important;
}

.btn-spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  display: inline-block;
  animation: btn-spin 0.75s linear infinite;
}

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

.animate-on-scroll {
  opacity: 0;
  transform: translate3d(0, 35px, 0);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.floating-badge {
  position: relative;
  overflow: hidden;
}

.floating-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2.4s infinite;
  pointer-events: none;
}

.material-symbols-outlined{
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga';
  font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24;
  font-size: inherit;
}

.top-brand {
  max-width: min(52vw, 240px);
}

.top-header {
  width: 100%;
  max-width: 1380px;
}

.top-header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.top-nav {
  min-width: 0;
}

.top-nav-link {
  white-space: nowrap;
}

.top-controls {
  flex: 0 0 auto;
}

.top-cart-btn {
  position: relative;
  flex-shrink: 0;
}

.top-cart-badge {
  position: absolute;
  top: -7px;
  inset-inline-end: -6px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ea580c;
  color: #fff;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 0.26rem;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 20px -12px rgba(234, 88, 12, 0.85);
}

html[data-theme='dark'] .top-cart-btn {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.72);
  color: #d9e3f5;
}

html[data-theme='dark'] .top-cart-badge {
  border-color: rgba(15, 23, 42, 0.95);
}

.top-legacy-mobile {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  justify-content: center;
  justify-self: center;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1;
  box-shadow: 0 8px 22px -14px rgba(15, 23, 42, 0.4);
}

html[data-theme='dark'] .top-legacy-mobile {
  border-color: rgba(148, 163, 184, 0.38);
  background: rgba(15, 23, 42, 0.75);
  color: #d9e3f5;
}

@media (min-width: 640px) {
  .top-legacy-mobile {
    display: none !important;
  }
}

.top-brand-logo img {
  object-fit: contain !important;
}

.top-brand-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip {
  flex: 0 1 auto;
}

@media (min-width: 1024px) {
  .top-header-shell {
    display: grid;
    grid-template-columns: minmax(150px, auto) minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.9rem;
  }

  .top-nav {
    justify-content: center;
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-block: 2px;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-controls {
    gap: 0.45rem;
  }

  .top-controls .btn-outline-modern,
  .top-controls .btn-primary-modern {
    padding: 0.62rem 0.88rem;
  }

  .top-controls .user-chip {
    max-width: 164px !important;
  }

  .top-brand {
    max-width: 190px;
  }
}

@media (min-width: 1024px) and (max-width: 1220px) {
  .top-auth-btn span:last-child {
    display: none;
  }

  .top-auth-btn {
    min-width: 44px;
    padding-inline: 0.68rem !important;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

.cart-toast {
  position: fixed;
  inset-inline-end: 1.5rem;
  bottom: 1.5rem;
  z-index: 60;
  max-width: min(100%, 320px);
  transform: translate3d(0, 120%, 0);
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}

.home-hero {
  border: 1px solid rgba(255, 255, 255, 0.48);
}

html[data-theme='dark'] .home-hero {
  background: linear-gradient(135deg, rgba(8, 16, 30, 0.96) 0%, rgba(13, 22, 38, 0.92) 46%, rgba(40, 24, 12, 0.88) 100%) !important;
  border-color: rgba(148, 163, 184, 0.26);
  box-shadow: 0 34px 72px -42px rgba(2, 6, 23, 0.95);
}

html[data-theme='dark'] .home-hero > .absolute {
  background: radial-gradient(420px 420px at 95% 10%, rgba(249, 115, 22, 0.34), transparent) !important;
  opacity: 0.72;
}

html[data-theme='dark'] .home-status-card {
  background: linear-gradient(160deg, rgba(36, 49, 72, 0.9), rgba(17, 28, 47, 0.9));
  border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme='dark'] .home-status-metric {
  background: rgba(7, 15, 29, 0.9) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme='dark'] .home-status-foot {
  color: #ced9ee !important;
}

.cart-toast.visible {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.trust-slot {
  min-width: 94px;
  min-height: 72px;
  border-radius: 0.9rem;
  border: 1px dashed rgba(13, 18, 27, 0.2);
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.5rem;
  text-align: center;
}

html[data-theme='dark'] .trust-slot {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.trust-slot--badge {
  min-width: 112px;
  min-height: 88px;
  border-style: solid;
  border-color: rgba(13, 18, 27, 0.1);
}

.trust-badge-link {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trust-badge-image {
  display: block;
  max-width: 100%;
  height: auto;
}

.trust-badge-image--enamad {
  max-width: 120px;
}

.trust-badge-image--zarinpal {
  max-width: 80px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.auth-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 33, 0.55);
  backdrop-filter: blur(4px);
}

html[data-theme='dark'] .auth-modal__backdrop {
  background: rgba(2, 6, 23, 0.72);
}

.auth-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  padding: 1.3rem;
}

.gateway-card {
  display: block;
}

.gateway-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gateway-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid rgba(13, 18, 27, 0.14);
  border-radius: 0.95rem;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.75);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

html[data-theme='dark'] .gateway-card__body {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.72);
}

.gateway-card input:checked + .gateway-card__body {
  border-color: rgba(249, 115, 22, 0.75);
  box-shadow: 0 10px 24px -18px rgba(249, 115, 22, 0.8);
  transform: translateY(-1px);
}

.topup-gateway-select {
  direction: rtl;
  text-align: right;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-inline-start: 0.95rem !important;
  padding-inline-end: 2.45rem !important;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position: left 0.8rem center !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23475B7A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme='dark'] .topup-gateway-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23cbd5e1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme='dark'] input:not([type='checkbox']):not([type='radio']),
html[data-theme='dark'] select,
html[data-theme='dark'] textarea {
  background-color: var(--field-bg) !important;
  border-color: var(--field-border) !important;
  color: var(--field-text) !important;
}

html[data-theme='dark'] input::placeholder,
html[data-theme='dark'] textarea::placeholder {
  color: var(--field-placeholder) !important;
}

html[data-theme='dark'] .bg-surface-muted {
  background-color: transparent !important;
}

html[data-theme='dark'] .bg-ink-900 {
  background-color: var(--surface-strong) !important;
}

html[data-theme='dark'] .bg-white {
  background-color: rgba(15, 23, 42, 0.92) !important;
}

html[data-theme='dark'] .bg-white\/40 {
  background-color: rgba(15, 23, 42, 0.45) !important;
}

html[data-theme='dark'] .bg-white\/60 {
  background-color: rgba(15, 23, 42, 0.62) !important;
}

html[data-theme='dark'] .bg-white\/70 {
  background-color: rgba(15, 23, 42, 0.72) !important;
}

html[data-theme='dark'] .bg-white\/80 {
  background-color: rgba(15, 23, 42, 0.84) !important;
}

html[data-theme='dark'] .border-ink-100 {
  border-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme='dark'] .border-ink-200 {
  border-color: rgba(148, 163, 184, 0.34) !important;
}

html[data-theme='dark'] .border-ink-300 {
  border-color: rgba(148, 163, 184, 0.44) !important;
}

html[data-theme='dark'] .text-ink-300 {
  color: #a4b4d2 !important;
}

html[data-theme='dark'] .text-ink-400 {
  color: #b1bfd9 !important;
}

html[data-theme='dark'] .text-ink-500,
html[data-theme='dark'] .text-ink-500\/80 {
  color: #bfd0ea !important;
}

html[data-theme='dark'] .text-ink-600 {
  color: #c9d7ef !important;
}

html[data-theme='dark'] .text-ink-700 {
  color: #d6e1f4 !important;
}

html[data-theme='dark'] .text-ink-800,
html[data-theme='dark'] .text-ink-900 {
  color: #e6edf8 !important;
}

.topup-gateway-select option {
  direction: rtl;
  text-align: right;
}

body[data-page="order-form"] main[data-page-root] {
  padding-bottom: 4.5rem;
}

body[data-page="order-form"] main[data-page-root] > section:nth-of-type(1) {
  margin-top: 0.75rem !important;
}

body[data-page="order-form"] main[data-page-root] > section:nth-of-type(2) {
  margin-top: 1rem !important;
}

body[data-page="order-form"] main[data-page-root] > section:nth-of-type(3) {
  margin-top: 1.25rem !important;
}

body[data-page="order-form"] .space-y-6 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.8rem;
}

body[data-page="order-form"] .gap-6 {
  gap: 0.9rem;
}

@media (max-width: 640px) {
  body {
    background: linear-gradient(180deg, #f9fafc 0%, #ffffff 100%);
  }

  html[data-theme='dark'] body {
    background: linear-gradient(180deg, #0a1220 0%, #070d18 100%);
  }

  .cart-toast {
    inset-inline-end: 0.75rem;
  }

  .top-controls {
    gap: 0.35rem !important;
  }

  .top-brand {
    max-width: 44px;
    min-width: 44px;
    flex: 0 0 44px;
  }

  .top-brand-label {
    display: none;
  }

  .user-chip {
    max-width: 108px !important;
  }

  .user-chip [data-user-email] {
    font-size: 0.64rem;
  }

  .user-chip [data-user-balance] {
    font-size: 0.62rem;
  }
}

@media (max-width: 430px) {
  .top-brand {
    max-width: 42px;
    min-width: 42px;
    flex-basis: 42px;
  }

  .user-chip {
    max-width: 108px !important;
    padding-inline: 0.42rem !important;
  }

  .top-legacy-mobile {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    font-size: 10px !important;
    padding-inline: 0.34rem !important;
  }

  .top-controls {
    gap: 0.25rem !important;
  }

  .user-chip .material-symbols-outlined {
    font-size: 0.95rem;
  }

  [data-nav-toggle] {
    width: 36px !important;
    height: 36px !important;
  }
}
