/* Site- and admin-specific styles (design tokens come from pool3sot.css). */

.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 24px; background: #F5F7FB; }
.boot img { animation: breathe 1.6s ease-in-out infinite; border-radius: 22px; }
.boot-bar { width: 160px; height: 4px; border-radius: 4px; background: #E2E8F0; overflow: hidden; }
.boot-bar span { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, #14B8A6, #6D28D9); animation: bootbar 1.1s ease-in-out infinite; border-radius: 4px; }
@keyframes bootbar { 0% { transform: translateX(160px); } 100% { transform: translateX(-160px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 2000; background: #FEF2F2; color: #991B1B; padding: 12px 16px; font-family: Vazirmatn, Tahoma, sans-serif; }
#blazor-error-ui .dismiss { cursor: pointer; float: left; }

/* ---------- site header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-header.scrolled { border-color: var(--border); box-shadow: 0 6px 20px -16px rgba(15,23,42,.5); }
.site-header .inner { display: flex; align-items: center; gap: 16px; height: 72px; }
.site-nav { display: flex; gap: 4px; align-items: center; }
.site-nav a { color: var(--text); padding: 8px 14px; border-radius: 12px; font-weight: 500; transition: background .2s, color .2s; }
.site-nav a:hover, .site-nav a.active { background: var(--grad-soft); color: var(--brand-strong); }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .site-nav { display: none; position: absolute; top: 72px; right: 0; left: 0; flex-direction: column; align-items: stretch; background: var(--surface); padding: 12px 16px 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; animation: fadeUp .3s var(--ease); }
  .menu-btn { display: inline-flex; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 720px; height: 720px; background: radial-gradient(circle, rgba(14,165,233,.22), transparent 60%); animation: float 12s ease-in-out infinite; }
.hero::after { content: ""; position: absolute; inset: auto auto -40% -15%; width: 640px; height: 640px; background: radial-gradient(circle, rgba(109,40,217,.18), transparent 60%); animation: float 14s ease-in-out infinite reverse; }
.hero .inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.35; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.hero .badge-pill { display: inline-flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: .9rem; box-shadow: var(--shadow); margin-bottom: 18px; }
@media (max-width: 900px) { .hero .inner { grid-template-columns: 1fr; } .hero { padding: 40px 0 64px; } }

/* phones illustration */
.phones { position: relative; height: 440px; }
.phone { position: absolute; width: 200px; height: 400px; border-radius: 36px; background: #0F172A; padding: 10px; box-shadow: var(--shadow-lg); }
.phone .screen { width: 100%; height: 100%; border-radius: 28px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; padding: 18px 14px; gap: 10px; }
.phone.merchant { right: 8%; top: 10px; transform: rotate(6deg); animation: phoneA 6s ease-in-out infinite; }
.phone.customer { left: 8%; top: 40px; transform: rotate(-6deg); animation: phoneB 6s ease-in-out infinite; }
.phones .waves { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); width: 120px; height: 120px; }
.phones .waves span { position: absolute; inset: 0; border: 3px solid var(--sky); border-radius: 50%; opacity: 0; animation: ripple 2.4s var(--ease) infinite; }
.phones .waves span:nth-child(2) { animation-delay: .8s; }
.phones .waves span:nth-child(3) { animation-delay: 1.6s; }
.mini-line { height: 10px; border-radius: 6px; background: var(--surface-2); }
.mini-amount { font-weight: 800; font-size: 1.3rem; }
@keyframes phoneA { 0%, 100% { transform: translateX(0) rotate(6deg); } 50% { transform: translateX(-26px) rotate(3deg); } }
@keyframes phoneB { 0%, 100% { transform: translateX(0) rotate(-6deg); } 50% { transform: translateX(26px) rotate(-3deg); } }
@media (max-width: 520px) { .phones { height: 380px; transform: scale(.85); } }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head .kicker { color: var(--brand-strong); font-weight: 700; font-size: .9rem; letter-spacing: .5px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; margin: 6px 0 10px; }
.section-head p { color: var(--muted); margin: 0; }
.feature-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 14px; box-shadow: 0 12px 24px -12px rgba(14,165,233,.9); }
.step { position: relative; padding-top: 26px; }
.step .num-circle { position: absolute; top: -22px; right: 20px; width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.2rem; display: grid; place-items: center; box-shadow: var(--shadow); }
.stat-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; text-align: center; }
.stat-band .v { font-size: 2rem; font-weight: 800; }
.cta { background: var(--grad); color: #fff; border-radius: 28px; padding: 48px 32px; text-align: center; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.1); top: -120px; left: -80px; animation: float 9s ease-in-out infinite; }
.cta .btn-light { background: #fff; color: var(--violet); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; margin-bottom: 10px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.blog-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 14px; background: var(--grad-soft); }
.blog-cover-fallback { width: 100%; aspect-ratio: 16/9; border-radius: 14px; background: var(--grad); display: grid; place-items: center; color: #fff; }

/* ---------- footer ---------- */
.site-footer { background: #0B1120; color: #CBD5E1; padding: 56px 0 24px; margin-top: 40px; }
.site-footer a { color: #CBD5E1; }
.site-footer a:hover { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

/* ---------- user panel ---------- */
.panel-grid { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 32px 0; align-items: start; }
.panel-side { position: sticky; top: 90px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; color: var(--text); font-weight: 500; transition: background .2s, color .2s; }
.side-link:hover { background: var(--surface-2); }
.side-link.active { background: var(--grad-soft); color: var(--brand-strong); font-weight: 700; }
@media (max-width: 900px) { .panel-grid { grid-template-columns: 1fr; } .panel-side { position: static; } .panel-side .stack { flex-direction: row; overflow-x: auto; } .side-link { white-space: nowrap; } }

/* ---------- admin ---------- */
.admin-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.admin-side { background: #0B1120; color: #CBD5E1; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .side-link { color: #CBD5E1; }
.admin-side .side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side .side-link.active { background: linear-gradient(135deg, rgba(20,184,166,.25), rgba(109,40,217,.35)); color: #fff; }
.admin-side .group { font-size: .75rem; color: #64748B; margin: 16px 12px 6px; }
.admin-main { min-width: 0; }
.admin-top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 12px 24px; }
.admin-content { padding: 24px; }
.admin-menu-btn { display: none !important; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title h1 { font-size: 1.5rem; margin: 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 180px; }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar-chart .bar span.fill { width: 100%; border-radius: 8px 8px 4px 4px; background: var(--grad); min-height: 3px; transition: height .8s var(--ease); }
.bar-chart .bar span.fill.alt { background: linear-gradient(180deg, #F59E0B, #F97316); }
.bar-chart .bar small { font-size: .65rem; color: var(--muted); }
.switch { position: relative; width: 46px; height: 26px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: .25s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 3px; right: 3px; transition: .25s var(--ease); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--grad); }
.switch input:checked + span::before { transform: translateX(-20px); }
@media (max-width: 1000px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; inset: 0 0 0 auto; width: 280px; z-index: 200; transform: translateX(100%); transition: transform .3s var(--ease); }
  .admin-side.open { transform: none; }
  .admin-menu-btn { display: inline-flex !important; }
  .admin-content { padding: 16px; }
}
