:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #3b82f6;
  --blue-soft: #dbeafe;
  --white: #ffffff;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border: rgba(37, 99, 235, 0.18);
  --text: #0f172a;
  --muted: #64748b;
  --primary-gradient: linear-gradient(135deg, var(--blue-light) 0%, var(--blue-dark) 100%);
  --primary: var(--blue);
  --primary-2: var(--blue-dark);
  --cyan: var(--blue);
  --purple: var(--blue-dark);
  --pink: var(--blue-light);
  --gold: var(--blue);
  --green: #25d366;
  --page-pad: clamp(0.75rem, 3vw, 1.5rem);
  --content-max: 1200px;
  --banner-radius: 24px;
  --banner-mini-gap: 0.8rem;
  --about-features-gap: clamp(1.35rem, 3.5vw, 2rem);
  --radius: 14px;
  --news-ticker-bg: linear-gradient(90deg, #f8fafc 0%, #eff6ff 45%, #f8fafc 100%);
  --news-ticker-text: linear-gradient(135deg, #1e3a8a 0%, #2563eb 42%, #1d4ed8 100%);
  --shadow-soft: rgba(37, 99, 235, 0.06);
  --shadow-medium: rgba(37, 99, 235, 0.12);
  --overlay: rgba(15, 23, 42, 0.45);
  --header-shadow: 0 4px 20px rgba(37, 99, 235, 0.06);
  --side-nav-shadow: -12px 0 40px rgba(37, 99, 235, 0.12);
  --search-focus-bg: var(--white);
  --modal-overlay: rgba(15, 23, 42, 0.45);
}

[data-theme="dark"] {
  --blue-soft: rgba(59, 130, 246, 0.16);
  --white: #1e293b;
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --border: rgba(96, 165, 250, 0.22);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --news-ticker-bg: linear-gradient(90deg, #1e293b 0%, #1e3a5f 45%, #1e293b 100%);
  --news-ticker-text: linear-gradient(135deg, #93c5fd 0%, #60a5fa 42%, #3b82f6 100%);
  --shadow-soft: rgba(0, 0, 0, 0.2);
  --shadow-medium: rgba(0, 0, 0, 0.35);
  --overlay: rgba(2, 6, 23, 0.72);
  --header-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --side-nav-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  --search-focus-bg: #334155;
  --modal-overlay: rgba(2, 6, 23, 0.78);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(37, 99, 235, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(37, 99, 235, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
}

.hidden { display: none !important; }

/* ─── Header ─── */

.site-header {
  padding: 0.55rem var(--page-pad);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--header-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  direction: ltr;
  overflow: visible;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.header-brand:hover {
  opacity: 0.88;
}

.site-title {
  font-size: clamp(1.05rem, 3.2vw, 1.45rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.15));
  position: relative;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-title::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 2px;
  z-index: -1;
  background: none;
  -webkit-text-fill-color: rgba(37, 99, 235, 0.12);
  filter: blur(1px);
}

.header-logo {
  height: clamp(36px, 7vw, 44px);
  width: clamp(36px, 7vw, 44px);
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  background: transparent;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  overflow: visible;
}

.header-prefs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  overflow: visible;
}

.header-pref-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--blue-dark);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.header-pref-btn:hover,
.header-pref-btn:focus-visible {
  background: var(--blue-soft);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
  outline: none;
}

.header-pref-btn__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-pref-btn--theme .icon-sun {
  display: block;
}

.header-pref-btn--theme .icon-moon {
  display: none;
}

[data-theme="dark"] .header-pref-btn--theme .icon-sun,
#theme-toggle.is-dark .header-pref-btn--theme .icon-sun {
  display: none;
}

[data-theme="dark"] .header-pref-btn--theme .icon-moon,
#theme-toggle.is-dark .header-pref-btn--theme .icon-moon {
  display: block;
}

.header-pref-tooltip {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  background: var(--text);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.header-pref-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: var(--text);
}

.header-login-btn .header-pref-tooltip {
  max-width: 11rem;
  white-space: normal;
  text-align: center;
}

.header-pref-btn:hover .header-pref-tooltip,
.header-pref-btn:focus-visible .header-pref-tooltip,
.header-login-btn:hover .header-pref-tooltip,
.header-login-btn:focus-visible .header-pref-tooltip {
  opacity: 1;
  visibility: visible;
}

.header-lang-wrap:has(#lang-menu:not(.hidden)) .header-pref-tooltip {
  opacity: 0;
  visibility: hidden;
}

.header-lang-wrap {
  position: relative;
  flex-shrink: 0;
}

.header-lang-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  inset-inline-end: 0;
  min-width: 8.5rem;
  padding: 0.3rem;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px var(--shadow-medium);
  z-index: 120;
}

.header-lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.6rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease;
}

.header-lang-option:hover,
.header-lang-option:focus-visible {
  background: var(--bg-soft);
  outline: none;
}

.header-lang-option.is-active {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.header-lang-flag {
  font-size: 0.9rem;
  line-height: 1;
}

.header-login-btn,
.header-menu-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--blue-dark);
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.header-login-btn:hover,
.header-menu-btn:hover {
  background: var(--blue-soft);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}

.header-login-btn:focus-visible,
.header-menu-btn:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.header-login-icon {
  display: block;
}

.header-wallet {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.header-wallet.hidden {
  display: none;
}

.header-wallet-balance {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 2.5rem;
  padding: 0 0.72rem;
  border: 1px solid rgba(22, 163, 74, 0.22);
  border-radius: 10px;
  background: rgba(22, 163, 74, 0.07);
  text-decoration: none;
  color: #16a34a;
  font-weight: 800;
  font-size: 0.88rem;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-wallet-balance:hover,
.header-wallet-balance:focus-visible {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.35);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.12);
  outline: none;
}

.header-wallet-currency,
#header-wallet-amount {
  color: inherit;
}

.header-wallet-currency {
  font-size: 0.78rem;
  opacity: 0.9;
}

[data-theme="dark"] .header-wallet-balance {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.24);
}

.header-wallet-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(59, 130, 246, 0.08));
  color: var(--blue);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.header-wallet-add:hover,
.header-wallet-add:focus-visible {
  background: var(--blue-soft);
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
  outline: none;
}

.header-notifications {
  position: relative;
  flex-shrink: 0;
}

.header-notifications-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(234, 179, 8, 0.28);
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.08);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.header-notifications-icon {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(202, 138, 4, 0.35));
}

.header-notifications-btn:hover,
.header-notifications-btn:focus-visible {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(234, 179, 8, 0.5);
  box-shadow: 0 2px 10px rgba(234, 179, 8, 0.2);
  outline: none;
  transform: translateY(-1px);
}

.header-notifications-badge {
  position: absolute;
  top: -0.3rem;
  inset-inline-end: -0.25rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.header-notifications-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  inset-inline-end: 0;
  width: min(92vw, 360px);
  max-height: 420px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 18px 40px var(--shadow-medium);
  z-index: 170;
  overflow: hidden;
}

@media (max-width: 640px) {
  .header-notifications-panel {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 3.7rem);
    left: 0.65rem;
    right: 0.65rem;
    inset-inline-end: auto;
    width: auto;
    max-width: none;
    max-height: min(70dvh, 420px);
  }

  .header-notifications-list {
    max-height: min(58dvh, 340px);
  }
}

.header-notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}

.header-notifications-head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
}

.header-notifications-mark-all {
  border: none;
  background: none;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.header-notifications-list {
  overflow-y: auto;
  max-height: 340px;
}

.header-notification-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: inherit;
  cursor: pointer;
  font: inherit;
}

.header-notification-item:hover,
.header-notification-item:focus-visible {
  background: var(--bg-soft);
  outline: none;
}

.header-notification-item.is-unread {
  background: rgba(37, 99, 235, 0.05);
}

.header-notification-item.is-gift-code .header-notification-message {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}

.header-notification-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text);
}

.header-notification-message {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
  white-space: pre-wrap;
}

.header-notification-date {
  font-size: 0.68rem;
  color: var(--muted);
}

.header-notifications-empty {
  margin: 0;
  padding: 1.25rem 0.9rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
}

/* ─── Broadcast popup (center screen, all visitors) ─── */

.broadcast-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--page-pad);
  background: var(--modal-overlay);
  backdrop-filter: blur(4px);
  z-index: 1100;
}

.broadcast-popup.hidden {
  display: none;
}

.broadcast-popup-card {
  width: min(92vw, 480px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.5rem 1.35rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.18);
  text-align: center;
}

.broadcast-popup-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.45;
}

.broadcast-popup-message {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
  text-align: start;
}

.broadcast-popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.broadcast-popup-btn:hover,
.broadcast-popup-btn:focus-visible {
  background: #1d4ed8;
  outline: none;
  transform: translateY(-1px);
}

.personal-notification-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  z-index: 1300;
}

.gift-code-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
  z-index: 1300;
}

.personal-notification-popup.hidden,
.gift-code-popup.hidden {
  display: none;
}

.personal-notification-card,
.gift-code-card {
  position: relative;
  z-index: 2;
  width: min(92vw, 480px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.16);
  text-align: center;
}

.gift-code-close {
  top: 0.85rem;
  inset-inline-end: 0.85rem;
  z-index: 6;
}

.personal-notification-icon {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
}

.gift-code-burst {
  font-size: 4.75rem;
  line-height: 1;
  margin-bottom: 0.85rem;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.18));
  animation: gift-burst 1.2s ease infinite alternate;
}

@keyframes gift-burst {
  from { transform: scale(1) rotate(-4deg); }
  to { transform: scale(1.08) rotate(4deg); }
}

.personal-notification-title,
.gift-code-title {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.personal-notification-message {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--muted);
  text-align: start;
}

.gift-code-message {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  font-weight: 500;
  text-align: start;
}

.money-amount-3d,
.gift-code-amount {
  font-size: clamp(2rem, 7vw, 2.65rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.85rem;
  color: #16a34a;
  letter-spacing: -0.02em;
  text-shadow:
    0 1px 0 #4ade80,
    0 2px 0 #22c55e,
    0 3px 0 #15803d,
    0 4px 0 #166534,
    0 8px 18px rgba(22, 163, 74, 0.35);
}

.gift-code-hint {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text);
  text-align: start;
}

.gift-code-hint strong {
  color: var(--primary);
}

.gift-code-code-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.gift-code-value {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px dashed rgba(37, 99, 235, 0.35);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.gift-code-copy-btn,
.personal-notification-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8rem;
  padding: 0.7rem 1.1rem;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.gift-code-copy-status {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #16a34a;
}

.gift-code-timer {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #dc2626;
}

.gift-code-timer.hidden {
  display: none;
}

.gift-code-burst-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  width: min(88vw, 380px);
  height: 300px;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.gift-code-card.is-waiting {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.94) translateY(12px);
}

/* ─── Gift explosion (burst layer + panel) ─── */

.gift-explosion-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gift-explosion-stage--burst {
  border-radius: 24px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 251, 235, 0.98) 0%, rgba(255, 255, 255, 0.92) 42%, rgba(255, 255, 255, 0.55) 100%);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.gift-explosion-stage--panel {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
}

.gift-explosion-host {
  position: relative;
  overflow: visible;
}

.topup-redeem-panel.gift-explosion-host {
  z-index: 2;
}

.gift-explosion-stage.is-active {
  opacity: 1;
}

.gift-explosion-stage.is-fading {
  opacity: 0;
}

.gift-explosion-glow {
  position: absolute;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.35) 0%, rgba(251, 191, 36, 0.06) 55%, transparent 72%);
  transform: scale(0.5);
  opacity: 0;
}

.gift-explosion-stage.is-burst .gift-explosion-glow {
  animation: gift-glow-burst 0.9s ease-out forwards;
}

.gift-code-card {
  position: relative;
  z-index: 2;
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s ease;
}

.gift-explosion-stage--burst .gift-explosion-box {
  width: 8.5rem;
  height: 8.5rem;
}

.gift-explosion-stage--burst .gift-explosion-box-body {
  font-size: 5.75rem;
}

.gift-explosion-stage--panel .gift-explosion-box {
  width: 6.5rem;
  height: 6.5rem;
}

.gift-explosion-stage--panel .gift-explosion-box-body {
  font-size: 4.25rem;
}

.gift-explosion-stage--panel .gift-explosion-amount-fly {
  font-size: clamp(1.5rem, 5vw, 2rem);
}

.gift-explosion-box {
  position: relative;
  z-index: 2;
  width: 10.5rem;
  height: 10.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
}

.gift-explosion-box-body {
  font-size: 7.25rem;
  line-height: 1;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.28));
}

.gift-explosion-box-lid {
  position: absolute;
  top: 0.35rem;
  left: 50%;
  width: 4.8rem;
  height: 1.4rem;
  margin-left: -2.4rem;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
  transform-origin: center bottom;
  opacity: 0;
}

.gift-explosion-box.is-shaking {
  animation: gift-box-shake 0.65s ease-in-out;
}

.gift-explosion-box.is-bursting .gift-explosion-box-body {
  animation: gift-box-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.gift-explosion-box.is-bursting .gift-explosion-box-lid {
  opacity: 1;
  animation: gift-lid-fly 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.gift-popcorn-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.gift-popcorn-piece {
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
}

.gift-popcorn-piece.is-emoji {
  font-size: 1.85rem;
  line-height: 1;
}

.gift-popcorn-piece.is-kernel {
  width: 0.55rem;
  height: 0.72rem;
  border-radius: 46% 46% 38% 38%;
  background: linear-gradient(155deg, #fff8dc 0%, #fcd34d 52%, #d97706 100%);
  box-shadow: inset -1px -2px 0 rgba(180, 83, 9, 0.28);
}

.gift-explosion-stage.is-burst .gift-popcorn-piece {
  animation: gift-popcorn-fly var(--pop-dur, 1s) cubic-bezier(0.25, 0.9, 0.35, 1) forwards;
  animation-delay: var(--pop-delay, 0s);
}

.gift-explosion-amount-fly {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  font-size: clamp(2.2rem, 9vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #16a34a;
  text-shadow:
    0 1px 0 #4ade80,
    0 2px 0 #22c55e,
    0 3px 0 #15803d,
    0 6px 18px rgba(22, 163, 74, 0.45);
  white-space: nowrap;
}

.gift-explosion-amount-fly.is-visible {
  animation: gift-amount-reveal 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes gift-box-shake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-8deg) scale(1.04); }
  40% { transform: rotate(8deg) scale(1.06); }
  60% { transform: rotate(-6deg) scale(1.08); }
  80% { transform: rotate(6deg) scale(1.1); }
}

@keyframes gift-box-pop {
  0% { transform: scale(1); opacity: 1; }
  35% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.15); opacity: 0; }
}

@keyframes gift-lid-fly {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-5.5rem) rotate(-28deg); opacity: 0; }
}

@keyframes gift-glow-burst {
  0% { transform: scale(0.4); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(1.65); opacity: 0; }
}

@keyframes gift-popcorn-fly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(calc(var(--pop-scale) * 0.35)) rotate(0deg);
  }
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--pop-x)), calc(-50% + var(--pop-y))) scale(calc(var(--pop-scale) * 0.3)) rotate(var(--pop-rot));
  }
}

@keyframes gift-amount-reveal {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  45% { opacity: 1; transform: translate(-50%, -58%) scale(1.18); }
  100% { opacity: 1; transform: translate(-50%, -72%) scale(1); }
}

.topup-redeem-panel {
  margin-bottom: 1rem;
}

.topup-redeem-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.01em;
}

.topup-redeem-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.topup-redeem-row.hidden {
  display: none;
}

.topup-redeem-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.topup-redeem-progress {
  margin-top: 0.15rem;
}

.topup-redeem-progress.hidden {
  display: none;
}

.topup-redeem-progress-label {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

.topup-redeem-progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(37, 99, 235, 0.12);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.topup-redeem-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 55%, #2563eb 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.35);
}

.topup-redeem-progress-bar.is-animating {
  transition: width 5s cubic-bezier(0.22, 1, 0.36, 1);
  animation: topup-redeem-shimmer 1.1s linear infinite;
}

@keyframes topup-redeem-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.header-menu-icon {
  position: relative;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.header-menu-icon::before,
.header-menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease, top 0.2s ease;
}

.header-menu-icon::before { top: -6px; }
.header-menu-icon::after { top: 6px; }

.header-menu-btn[aria-expanded="true"] .header-menu-icon {
  background: transparent;
}

.header-menu-btn[aria-expanded="true"] .header-menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.header-menu-btn[aria-expanded="true"] .header-menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.header-side-nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(2px);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.header-side-nav-overlay.is-visible {
  opacity: 1;
}

.header-side-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  width: min(272px, 84vw);
  height: 100vh;
  height: 100dvh;
  background: var(--white);
  border-right: 1px solid var(--border);
  box-shadow: var(--side-nav-shadow);
  z-index: 160;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  transform: translate3d(-100%, 0, 0);
  transition: transform 0.28s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.header-side-nav.is-open {
  transform: translate3d(0, 0, 0);
}

html[dir="rtl"] .header-side-nav:not(.is-open),
html[dir="ltr"] .header-side-nav:not(.is-open) {
  left: 0;
  right: auto;
  transform: translate3d(-100%, 0, 0);
}

html[dir="rtl"] .header-side-nav.is-open,
html[dir="ltr"] .header-side-nav.is-open {
  left: 0;
  right: auto;
  transform: translate3d(0, 0, 0);
}

html[dir="ltr"] {
  --side-nav-shadow: 12px 0 40px rgba(37, 99, 235, 0.12);
}

[data-theme="dark"] html[dir="ltr"] {
  --side-nav-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
}

.header-side-nav--member {
  width: min(290px, 88vw);
  padding: 0;
  overflow: hidden;
}

.header-side-nav--member .header-side-nav-close {
  z-index: 5;
}

.side-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, 0.35) transparent;
}

.side-nav-scroll::-webkit-scrollbar {
  width: 5px;
}

.side-nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.35);
  border-radius: 999px;
}

.side-nav-member-head {
  text-align: center;
  padding: 1.15rem 1rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}

.side-nav-logo-wrap--member {
  margin-bottom: 0.85rem;
}

.side-nav-member-identity-box {
  width: 100%;
  margin: 0 auto 0.8rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  text-align: center;
  box-shadow: 0 3px 14px rgba(37, 99, 235, 0.07);
}

[data-theme="dark"] .side-nav-member-identity-box {
  background: var(--bg-card);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
}

.side-nav-member-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.28rem;
  min-width: 0;
}

.side-nav-member-username {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--blue-dark);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 100%;
}

.side-nav-member-public-id {
  flex-shrink: 0;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: #1d7fb8;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.side-nav-member-email {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-nav-member-balance-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 0.15rem;
}

.side-nav-member-balance-row .side-nav-member-balance {
  margin: 0;
}

.side-nav-tool-btn--add {
  color: var(--blue);
  border-color: rgba(37, 99, 235, 0.25);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.08));
}

.side-nav-member-balance {
  margin: 0 0 0.7rem;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  color: #16a34a;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem;
}

[data-theme="dark"] .side-nav-member-balance {
  color: #4ade80;
}

.side-nav-member-balance-currency {
  font-size: 0.95rem;
  color: inherit;
  opacity: 0.92;
}

.side-nav-member-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.side-nav-tool-btn {
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.side-nav-tool-btn:hover,
.side-nav-tool-btn:focus-visible {
  background: var(--blue-soft);
  border-color: rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
  outline: none;
}

.side-nav-tool-btn--logout {
  color: #ef4444;
}

.side-nav-tool-btn:hover .side-nav-tooltip,
.side-nav-tool-btn:focus-visible .side-nav-tooltip {
  opacity: 1;
  visibility: visible;
}

.side-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0.55rem;
}

.side-nav-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.62rem 0.7rem;
  margin-bottom: 0.2rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease;
}

.side-nav-menu-link:hover,
.side-nav-menu-link:focus-visible {
  background: var(--bg-soft);
  outline: none;
}

html[dir="rtl"] .side-nav-menu-link:hover,
html[dir="rtl"] .side-nav-menu-link:focus-visible {
  transform: translateX(-4px);
  box-shadow: inset 3px 0 0 var(--blue);
}

html[dir="ltr"] .side-nav-menu-link:hover,
html[dir="ltr"] .side-nav-menu-link:focus-visible {
  transform: translateX(4px);
  box-shadow: inset -3px 0 0 var(--blue);
}

.side-nav-menu-link.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue-dark);
}

.side-nav-menu-text-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.side-nav-menu-text {
  font-size: 0.82rem;
  font-weight: 700;
}

.side-nav-orders-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2a9fd6 0%, #1d7fb8 100%);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(29, 127, 184, 0.35);
}

.side-nav-orders-badge.hidden {
  display: none;
}

.side-nav-menu-link.has-orders-badge {
  background: rgba(42, 159, 214, 0.1);
}

.side-nav-menu-link.has-orders-badge .side-nav-menu-icon--orders {
  background: rgba(42, 159, 214, 0.2);
  color: #1d7fb8;
}

.side-nav-menu-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.side-nav-menu-icon--home { background: rgba(34, 197, 94, 0.16); color: #16a34a; }
.side-nav-menu-icon--imei { background: rgba(99, 102, 241, 0.16); color: #4f46e5; }
.side-nav-menu-icon--tools { background: rgba(249, 115, 22, 0.16); color: #ea580c; }
.side-nav-menu-icon--remote { background: rgba(14, 165, 233, 0.16); color: #0284c7; }
.side-nav-menu-icon--balance { background: rgba(37, 99, 235, 0.16); color: #2563eb; }
.side-nav-menu-icon--payments { background: rgba(37, 99, 235, 0.16); color: #2563eb; }
.side-nav-menu-icon--analytics { background: rgba(99, 102, 241, 0.16); color: #4f46e5; }
.side-nav-menu-icon--wallet { background: rgba(234, 179, 8, 0.18); color: #ca8a04; }
.side-nav-menu-icon--settings { background: rgba(100, 116, 139, 0.16); color: #475569; }
.side-nav-menu-icon--orders { background: rgba(42, 159, 214, 0.18); color: #1d7fb8; }
.side-nav-menu-icon--about { background: rgba(168, 85, 247, 0.16); color: #9333ea; }
.side-nav-menu-icon--security { background: rgba(34, 197, 94, 0.16); color: #16a34a; }

.section-placeholder {
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-placeholder .member-empty {
  margin: 0;
  text-align: center;
}

.side-nav-footer {
  margin-top: 0.35rem;
  padding: 0.65rem 1rem 0.25rem;
  border-top: 1px solid var(--border);
}

.side-nav-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.side-nav-footer-logo {
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
  border-radius: 50%;
}

.side-nav-footer-copy {
  margin: 0;
  text-align: center;
  font-size: 0.65rem;
  color: var(--muted);
}

.side-nav-profile {
  position: relative;
  text-align: center;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}

.side-nav-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.55rem 0.65rem 0.15rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.side-nav-topbar--member {
  justify-content: space-between;
  gap: 0.55rem;
  padding-top: 0.65rem;
  padding-bottom: 0.45rem;
}

.side-nav-topbar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 2rem;
  padding: 0.35rem 0.72rem;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(255, 255, 255, 0.98));
  color: #dc2626;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.side-nav-topbar-logout:hover,
.side-nav-topbar-logout:focus-visible {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.98), rgba(255, 255, 255, 1));
  border-color: rgba(239, 68, 68, 0.38);
  color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.14);
  outline: none;
}

[data-theme="dark"] .side-nav-topbar-logout {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.28), rgba(30, 41, 59, 0.55));
  border-color: rgba(248, 113, 113, 0.28);
  color: #f87171;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .side-nav-topbar-logout:hover,
[data-theme="dark"] .side-nav-topbar-logout:focus-visible {
  background: linear-gradient(135deg, rgba(153, 27, 27, 0.42), rgba(30, 41, 59, 0.72));
  border-color: rgba(248, 113, 113, 0.42);
  color: #fca5a5;
}

.side-nav-topbar-logout svg {
  flex-shrink: 0;
}

.side-nav-topbar-logout-text {
  white-space: nowrap;
}

html[dir="rtl"] .side-nav-topbar {
  justify-content: flex-end;
}

html[dir="rtl"] .side-nav-topbar--member {
  justify-content: space-between;
}

html[dir="ltr"] .side-nav-topbar {
  justify-content: flex-end;
}

html[dir="ltr"] .side-nav-topbar--member {
  justify-content: space-between;
}

.header-side-nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.header-side-nav-close:hover,
.header-side-nav-close:focus-visible {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: rgba(37, 99, 235, 0.28);
  transform: scale(1.04);
  outline: none;
}

.side-nav-logo-wrap {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.55rem;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.08);
  padding: 0.35rem;
}

.side-nav-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.side-nav-site-name {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--blue-dark);
  letter-spacing: 0.02em;
}

.side-nav-site-tagline {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side-nav-logout-wrap {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border);
}

.side-nav-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.15rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.side-nav-logout-btn:hover,
.side-nav-logout-btn:focus-visible {
  background: var(--bg-soft);
  border-color: rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
  outline: none;
}

.side-nav-profile--customer {
  padding-bottom: 0.75rem;
}

.side-nav-avatar-wrap {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.55rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue-soft), #fff);
  border: 1px solid rgba(37, 99, 235, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.12);
}

.side-nav-avatar-initial {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}

.side-nav-welcome {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.side-nav-customer-name {
  margin-bottom: 0.15rem;
}

.side-nav-customer-user {
  margin-bottom: 0.45rem;
  -webkit-line-clamp: 1;
}

.side-nav-profile--customer .side-nav-account-balance {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.side-nav-profile--customer .side-nav-account-balance strong {
  color: var(--blue);
  font-weight: 800;
}

.side-nav-profile-actions {
  display: flex;
  justify-content: center;
  padding: 0 0.5rem 0.15rem;
}

.side-nav-logout-btn {
  min-height: 2rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  max-width: 11rem;
}

.side-nav-body {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.side-nav-tooltip {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.22rem 0.45rem;
  border-radius: 6px;
  background: var(--text);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease, visibility 0.1s ease;
  z-index: 30;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.side-nav-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--text);
}

.side-nav-tool-btn:hover .side-nav-tooltip,
.side-nav-tool-btn:focus-visible .side-nav-tooltip {
  opacity: 1;
  visibility: visible;
}

.header-login-btn--active {
  background: var(--blue-soft);
  border-color: rgba(37, 99, 235, 0.28);
}

.header-login-initial {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--blue);
  background: #fff;
}

body.menu-open {
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Promo: News Ticker & Banners ─── */

.site-promo {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.5rem var(--page-pad) 0;
  box-sizing: border-box;
}

.news-ticker {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  border-radius: 16px;
  background: var(--news-ticker-bg);
  border: 1px solid var(--border);
  box-shadow: 0 2px 14px var(--shadow-soft);
  overflow: hidden;
  box-sizing: border-box;
}

.news-ticker-badge {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--primary-gradient);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.news-ticker-track {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding-inline: 2.5rem;
  box-sizing: border-box;
  overflow: hidden;
}

.news-ticker-text {
  margin: 0;
  width: auto;
  max-width: 100%;
  text-align: center;
  font-size: clamp(0.82rem, 1.05vw + 0.55rem, 1rem);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: news-fade-in 0.55s ease;
}

/* نص عادي — التدرّج الافتراضي للشريط */
.news-ticker-text:not(.news-ticker-text--custom) {
  background: var(--news-ticker-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* نص منسّق من المحرر — إظهار ألوان وتدرّجات داخل النص */
.news-ticker-text.news-ticker-text--custom.rich-content {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  color: #1e3a8a;
}

[data-theme="dark"] .news-ticker-text.news-ticker-text--custom.rich-content {
  color: #93c5fd;
}

.news-ticker-text.news-ticker-text--custom.rich-content p,
.news-ticker-text.news-ticker-text--custom.rich-content div {
  margin: 0;
  display: inline;
}

.news-ticker-text.news-ticker-text--custom.rich-content span[style*="color"],
.news-ticker-text.news-ticker-text--custom.rich-content strong,
.news-ticker-text.news-ticker-text--custom.rich-content em {
  -webkit-text-fill-color: currentColor;
}

.news-ticker-text.news-ticker-text--custom.rich-content .rich-neon-flow,
.news-ticker-text.news-ticker-text--custom.rich-content span[style*="background-clip"],
.news-ticker-text.news-ticker-text--custom.rich-content span[style*="-webkit-background-clip"] {
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.news-ticker-text.rich-content img {
  display: none;
}

@keyframes news-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 641px) {
  .news-ticker {
    min-height: 2.75rem;
  }

  .news-ticker-badge {
    inset-inline-start: 1rem;
  }

  .news-ticker-track {
    padding-inline: 3rem;
  }
}

.home-banners {
  position: relative;
  width: 100%;
  margin-top: 0.65rem;
  aspect-ratio: 12 / 5;
  border-radius: var(--banner-radius);
  overflow: hidden;
  border: none;
  box-shadow:
    0 10px 32px rgba(15, 23, 42, 0.14),
    0 2px 10px rgba(37, 99, 235, 0.1);
  background: #0b1220;
  box-sizing: border-box;
}

.home-banners-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.85s ease;
  pointer-events: none;
}

.banner-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.banner-dots {
  position: absolute;
  left: 50%;
  bottom: 0.55rem;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.35rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
}

.banner-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: transform 0.2s ease, background 0.2s ease;
}

.banner-dot.is-active {
  background: #ffffff;
  transform: scale(1.15);
}

.home-mini-banners {
  margin-top: var(--banner-mini-gap);
  aspect-ratio: 48 / 5;
  box-shadow:
    0 6px 20px rgba(15, 23, 42, 0.1),
    0 1px 6px rgba(37, 99, 235, 0.08);
}

.home-mini-banners .banner-dots {
  bottom: 0.35rem;
  padding: 0.16rem 0.4rem;
}

.home-mini-banners .banner-dot {
  width: 0.32rem;
  height: 0.32rem;
}

.about-features {
  margin-top: var(--about-features-gap);
}

.about-features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.65rem, 2vw, 1rem);
}

.about-feature-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-height: 10.5rem;
  padding: clamp(1.15rem, 2.5vw, 1.45rem);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow:
    0 8px 24px var(--shadow-soft),
    0 1px 4px rgba(37, 99, 235, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.about-feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow:
    0 14px 32px var(--shadow-medium),
    0 2px 8px rgba(37, 99, 235, 0.1);
}

.about-feature-icon {
  flex-shrink: 0;
  width: 3.1rem;
  height: 3.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #fff;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.about-feature-body {
  min-width: 0;
  flex: 1;
}

.about-feature-title {
  margin: 0 0 0.45rem;
  font-size: clamp(0.92rem, 2.1vw, 1.02rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}

.about-feature-text {
  margin: 0;
  font-size: clamp(0.78rem, 1.9vw, 0.86rem);
  line-height: 1.6;
  color: var(--muted);
}

.about-feature-card--shield .about-feature-icon {
  background: linear-gradient(145deg, #34d399 0%, #059669 100%);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28);
}

.about-feature-card--payment .about-feature-icon {
  background: linear-gradient(145deg, #60a5fa 0%, #2563eb 100%);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.about-feature-card--support .about-feature-icon {
  background: linear-gradient(145deg, #a78bfa 0%, #7c3aed 100%);
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.26);
}

.about-feature-card--rocket .about-feature-icon {
  background: linear-gradient(145deg, #fb923c 0%, #ea580c 100%);
  border-color: rgba(234, 88, 12, 0.35);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.26);
}

.about-feature-card--star .about-feature-icon {
  background: linear-gradient(145deg, #fbbf24 0%, #d97706 100%);
  border-color: rgba(217, 119, 6, 0.35);
  color: #fffbeb;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.24);
}

.about-feature-card--clock .about-feature-icon {
  background: linear-gradient(145deg, #22d3ee 0%, #0891b2 100%);
  border-color: rgba(8, 145, 178, 0.35);
  box-shadow: 0 8px 20px rgba(8, 145, 178, 0.24);
}

.home-how-it-works {
  width: 100%;
  max-width: var(--content-max);
  margin: clamp(1.75rem, 4vw, 2.5rem) auto 0;
  padding: 0 var(--page-pad) clamp(1.5rem, 3vw, 2rem);
  box-sizing: border-box;
}

.home-how-it-works-inner {
  padding: clamp(1.15rem, 2.8vw, 1.65rem);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.35) 0%, rgba(255, 255, 255, 0.72) 100%);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px var(--shadow-soft);
}

[data-theme="dark"] .home-how-it-works-inner {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.22) 0%, rgba(15, 23, 42, 0.92) 100%);
}

.home-how-it-works-head {
  text-align: center;
  margin-bottom: clamp(1rem, 2.5vw, 1.45rem);
}

.home-how-it-works-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  font-weight: 800;
  color: var(--blue-dark);
}

[data-theme="dark"] .home-how-it-works-title {
  color: #93c5fd;
}

.home-how-it-works-sub {
  margin: 0 auto;
  max-width: 38rem;
  font-size: clamp(0.82rem, 2vw, 0.92rem);
  line-height: 1.6;
  color: var(--muted);
}

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.7rem, 2vw, 1rem);
  counter-reset: how-step;
}

.how-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 9.5rem;
  padding: 1rem 0.95rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px var(--shadow-soft);
}

.how-step:not(:last-child)::after {
  content: '‹';
  position: absolute;
  top: 50%;
  inset-inline-start: -0.55rem;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--blue);
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow-soft);
  z-index: 2;
}

html[dir="ltr"] .how-step:not(:last-child)::after {
  content: '›';
  inset-inline-start: auto;
  inset-inline-end: -0.55rem;
}

.how-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.how-step-num {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: var(--primary-gradient);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.how-step-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
}

.how-step--user .how-step-icon {
  background: linear-gradient(145deg, #60a5fa 0%, #2563eb 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.how-step--wallet .how-step-icon {
  background: linear-gradient(145deg, #34d399 0%, #059669 100%);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.24);
}

.how-step--service .how-step-icon {
  background: linear-gradient(145deg, #a78bfa 0%, #7c3aed 100%);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.24);
}

.how-step--check .how-step-icon {
  background: linear-gradient(145deg, #fbbf24 0%, #d97706 100%);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.22);
}

.how-step-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}

.how-step-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}

.home-why-us {
  width: 100%;
  max-width: var(--content-max);
  margin: clamp(1.5rem, 3.5vw, 2.25rem) auto 0;
  padding: 0 var(--page-pad) clamp(1.25rem, 3vw, 1.75rem);
  box-sizing: border-box;
}

.home-why-us-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
  align-items: stretch;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 34px var(--shadow-soft);
}

.home-why-us-intro {
  padding: clamp(1.25rem, 3vw, 1.85rem);
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
}

.home-why-us-title {
  margin: 0;
  font-size: clamp(1.1rem, 2.8vw, 1.45rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.home-why-us-sub {
  margin: 0;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

.why-us-list {
  list-style: none;
  margin: 0;
  padding: clamp(1rem, 2.2vw, 1.35rem);
  display: grid;
  gap: 0;
  background: var(--bg-card);
}

.why-us-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem 0.35rem;
  border-bottom: 1px dashed rgba(37, 99, 235, 0.16);
}

.why-us-item:last-child {
  border-bottom: none;
  padding-bottom: 0.2rem;
}

.why-us-item:first-child {
  padding-top: 0.2rem;
}

.why-us-marker {
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
  flex-shrink: 0;
}

.why-us-item--fast .why-us-marker {
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.why-us-item--prices .why-us-marker {
  background: #059669;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.14);
}

.why-us-item--support .why-us-marker {
  background: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
}

.why-us-item--trust .why-us-marker {
  background: #d97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.why-us-item-title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.why-us-item-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}

.home-faq {
  width: 100%;
  max-width: var(--content-max);
  margin: clamp(1.5rem, 3.5vw, 2.25rem) auto 0;
  padding: 0 var(--page-pad) clamp(1.5rem, 3.5vw, 2.25rem);
  box-sizing: border-box;
}

.home-faq-inner {
  padding: clamp(1.15rem, 2.8vw, 1.65rem);
  border-radius: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px var(--shadow-soft);
}

.home-faq-head {
  text-align: center;
  margin-bottom: clamp(0.95rem, 2.4vw, 1.35rem);
}

.home-faq-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.05rem, 2.8vw, 1.32rem);
  font-weight: 800;
  color: var(--blue-dark);
}

[data-theme="dark"] .home-faq-title {
  color: #93c5fd;
}

.home-faq-sub {
  margin: 0 auto;
  max-width: 36rem;
  font-size: clamp(0.82rem, 2vw, 0.9rem);
  line-height: 1.6;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 0.55rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 6px 18px var(--shadow-soft);
  background: var(--bg-card);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-toggle {
  width: 1.65rem;
  height: 1.65rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--blue-soft);
  border: 1px solid rgba(37, 99, 235, 0.18);
  position: relative;
  transition: transform 0.22s ease, background 0.22s ease;
}

.faq-toggle::before,
.faq-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.62rem;
  height: 2px;
  background: var(--blue-dark);
  transform: translate(-50%, -50%);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.faq-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open] .faq-toggle {
  background: var(--primary-gradient);
  border-color: transparent;
}

.faq-item[open] .faq-toggle::before,
.faq-item[open] .faq-toggle::after {
  background: #fff;
}

.faq-item[open] .faq-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg) scaleX(0);
  opacity: 0;
}

.faq-answer {
  padding: 0 1rem 1rem;
}

.faq-answer p {
  margin: 0;
  padding-top: 0.15rem;
  border-top: 1px dashed rgba(37, 99, 235, 0.14);
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ─── Home scroll animations ─── */

@media (prefers-reduced-motion: no-preference) {
  body[data-page="home"] .home-animate,
  body[data-page="about"] .home-animate {
    opacity: 0;
    transform: translate3d(0, 36px, 0) scale(0.965);
    filter: blur(7px);
    transition:
      opacity 0.78s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.78s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.78s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
  }

  body[data-page="home"] .home-animate.is-inview,
  body[data-page="about"] .home-animate.is-inview {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }

  body[data-page="home"] .home-animate--delay-1,
  body[data-page="about"] .home-animate--delay-1 { transition-delay: 0.08s; }
  body[data-page="home"] .home-animate--delay-2,
  body[data-page="about"] .home-animate--delay-2 { transition-delay: 0.16s; }
  body[data-page="home"] .home-animate--delay-3,
  body[data-page="about"] .home-animate--delay-3 { transition-delay: 0.24s; }
  body[data-page="home"] .home-animate--delay-4,
  body[data-page="about"] .home-animate--delay-4 { transition-delay: 0.32s; }
  body[data-page="home"] .home-animate--delay-5,
  body[data-page="about"] .home-animate--delay-5 { transition-delay: 0.4s; }
  body[data-page="home"] .home-animate--delay-6,
  body[data-page="about"] .home-animate--delay-6 { transition-delay: 0.48s; }
  body[data-page="home"] .home-animate--delay-7,
  body[data-page="about"] .home-animate--delay-7 { transition-delay: 0.56s; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .home-animate,
  body[data-page="about"] .home-animate {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ─── Side nav menu reveal (open + scroll) ─── */

@media (prefers-reduced-motion: no-preference) {
  .side-nav-menu > li.side-nav-reveal {
    opacity: 0;
    transform: translate3d(var(--nav-enter-x, 18px), 0, 0);
    transition:
      opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--nav-stagger, 0s);
    will-change: opacity, transform;
  }

  html[dir="rtl"] .header-side-nav .side-nav-menu > li.side-nav-reveal {
    --nav-enter-x: -18px;
  }

  html[dir="ltr"] .header-side-nav .side-nav-menu > li.side-nav-reveal {
    --nav-enter-x: 18px;
  }

  .side-nav-menu > li.side-nav-reveal.is-revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  .side-nav-menu > li.side-nav-reveal.is-revealed .side-nav-menu-icon {
    animation: side-nav-icon-pop 0.42s cubic-bezier(0.22, 1, 0.36, 1) var(--nav-stagger, 0s) both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .side-nav-menu > li.side-nav-reveal {
    opacity: 1;
    transform: none;
  }
}

@keyframes side-nav-icon-pop {
  0% {
    transform: scale(0.82);
    opacity: 0.55;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.page-main-home {
  padding-top: clamp(0.85rem, 2.5vw, 1.35rem);
}

.page-main-about {
  padding-top: clamp(0.65rem, 2vw, 1rem);
}

/* ─── About page ─── */

.about-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.55) 0%, rgba(255, 255, 255, 0.9) 52%, rgba(239, 246, 255, 0.75) 100%);
  box-shadow: 0 14px 36px var(--shadow-soft);
}

[data-theme="dark"] .about-hero {
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.35) 0%, rgba(15, 23, 42, 0.95) 55%, rgba(30, 64, 175, 0.2) 100%);
}

.about-hero-glow {
  position: absolute;
  inset: auto auto -35% -12%;
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, transparent 68%);
  pointer-events: none;
}

.about-hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(1.35rem, 3.5vw, 2rem);
  text-align: center;
}

.about-hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.about-hero-logo-wrap {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

[data-theme="dark"] .about-hero-logo-wrap {
  background: var(--bg-card);
}

.about-hero-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.about-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--blue-dark);
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .about-hero-badge {
  color: #93c5fd;
}

.about-hero-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 4vw, 1.95rem);
  font-weight: 900;
  line-height: 1.25;
  color: var(--blue-dark);
}

[data-theme="dark"] .about-hero-title {
  color: #bfdbfe;
}

.about-hero-lead {
  margin: 0 auto 0.65rem;
  max-width: 40rem;
  font-size: clamp(0.88rem, 2.2vw, 1rem);
  line-height: 1.7;
  font-weight: 600;
  color: var(--text);
}

.about-hero-intro {
  margin: 0 auto;
  max-width: 42rem;
  font-size: clamp(0.82rem, 2vw, 0.92rem);
  line-height: 1.75;
  color: var(--muted);
}

.about-story {
  margin-bottom: clamp(1.15rem, 3vw, 1.65rem);
}

.about-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1rem);
}

.about-story-card {
  position: relative;
  padding: clamp(1rem, 2.5vw, 1.25rem);
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 6px 20px var(--shadow-soft);
}

.about-story-card--mission {
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.35) 0%, var(--bg-card) 100%);
}

.about-story-card--vision {
  background: linear-gradient(180deg, rgba(224, 231, 255, 0.4) 0%, var(--bg-card) 100%);
}

[data-theme="dark"] .about-story-card--mission {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.25) 0%, var(--bg-card) 100%);
}

[data-theme="dark"] .about-story-card--vision {
  background: linear-gradient(180deg, rgba(49, 46, 129, 0.22) 0%, var(--bg-card) 100%);
}

.about-story-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 0.65rem;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.about-story-card--vision .about-story-icon {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}

.about-story-card-title {
  margin: 0 0 0.45rem;
  font-size: clamp(0.95rem, 2.4vw, 1.08rem);
  font-weight: 800;
  color: var(--text);
}

.about-story-card-text {
  margin: 0;
  font-size: clamp(0.8rem, 2vw, 0.88rem);
  line-height: 1.7;
  color: var(--muted);
}

.about-stats {
  margin-bottom: clamp(1.25rem, 3vw, 1.85rem);
}

.about-stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.65rem, 2vw, 0.85rem);
}

.about-stat {
  text-align: center;
  padding: clamp(0.85rem, 2.2vw, 1.1rem) 0.75rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px var(--shadow-soft);
}

.about-stat-value {
  display: block;
  margin-bottom: 0.35rem;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--blue);
}

.about-stat-title {
  margin: 0 0 0.3rem;
  font-size: clamp(0.82rem, 2vw, 0.9rem);
  font-weight: 800;
  color: var(--text);
}

.about-stat-text {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--muted);
}

.about-page-features {
  margin-bottom: clamp(1.35rem, 3.5vw, 2rem);
}

.about-section-head {
  text-align: center;
  margin-bottom: clamp(0.85rem, 2.2vw, 1.15rem);
}

.about-section-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.02rem, 2.8vw, 1.28rem);
  font-weight: 800;
  color: var(--blue-dark);
}

[data-theme="dark"] .about-section-title {
  color: #93c5fd;
}

.about-section-sub {
  margin: 0 auto;
  max-width: 36rem;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  line-height: 1.65;
  color: var(--muted);
}

.about-features--page {
  margin-top: 0;
}

.about-values {
  margin-bottom: clamp(1.35rem, 3.5vw, 2rem);
}

.about-values-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.7rem, 2vw, 0.9rem);
}

.about-value-card {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: clamp(0.9rem, 2.2vw, 1.05rem);
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-value-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.1);
}

.about-value-marker {
  flex-shrink: 0;
  width: 0.55rem;
  height: 2.1rem;
  margin-top: 0.15rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}

.about-value-card--prices .about-value-marker {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
}

.about-value-card--support .about-value-marker {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.about-value-card--trust .about-value-marker {
  background: linear-gradient(180deg, #a855f7 0%, #7c3aed 100%);
}

.about-value-title {
  margin: 0 0 0.3rem;
  font-size: clamp(0.86rem, 2.1vw, 0.95rem);
  font-weight: 800;
  color: var(--text);
}

.about-value-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--muted);
}

.about-contact {
  margin-bottom: 0.25rem;
}

.about-contact-inner {
  padding: clamp(1.1rem, 2.8vw, 1.45rem);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.28) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px var(--shadow-soft);
}

[data-theme="dark"] .about-contact-inner {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.2) 0%, rgba(15, 23, 42, 0.92) 100%);
}

.about-contact-head {
  text-align: center;
  margin-bottom: clamp(0.85rem, 2.2vw, 1.1rem);
}

.about-contact-links {
  list-style: none;
  margin: 0 0 clamp(1rem, 2.5vw, 1.25rem);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.65rem;
}

.about-contact-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 0.8rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.about-contact-link:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
}

.about-contact-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  flex-shrink: 0;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.about-contact-link--whatsapp .about-contact-link-icon { background: linear-gradient(135deg, #34d399 0%, #059669 100%); }
.about-contact-link--telegram .about-contact-link-icon { background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%); }
.about-contact-link--facebook .about-contact-link-icon { background: linear-gradient(135deg, #60a5fa 0%, #1d4ed8 100%); }
.about-contact-link--youtube .about-contact-link-icon { background: linear-gradient(135deg, #f87171 0%, #dc2626 100%); }
.about-contact-link--instagram .about-contact-link-icon { background: linear-gradient(135deg, #f472b6 0%, #db2777 100%); }

.about-contact-link-body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.about-contact-link-label {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.about-contact-link-hint {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

.about-contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

@media (max-width: 768px) {
  .about-story-grid,
  .about-values-grid {
    grid-template-columns: 1fr;
  }

  .about-stats-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-value-card:hover,
  .about-contact-link:hover {
    transform: none;
  }
}

/* ─── Layout ─── */

.page-main {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) var(--page-pad) clamp(2rem, 5vw, 3rem);
  box-sizing: border-box;
}

.page-heading {
  text-align: center;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.page-heading h2 {
  font-size: clamp(1rem, 3vw, 1.35rem);
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 0.35rem;
}

.page-heading p {
  color: var(--muted);
  font-size: clamp(0.8rem, 2vw, 0.95rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--blue);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: opacity 0.2s;
}

.back-link:hover { opacity: 0.8; }

/* ─── Section Catalog (Groups + Services) ─── */

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 38%) 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  align-items: start;
}

.catalog-toolbar__select,
.catalog-toolbar__input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.55rem 0.85rem;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.05);
}

.group-picker {
  position: relative;
  width: 100%;
}

.group-picker__trigger {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.05);
  cursor: pointer;
  text-align: start;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.group-picker__trigger:hover,
.group-picker__trigger[aria-expanded="true"] {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}

.group-picker__label {
  flex: 1;
  min-width: 0;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

.group-picker__chevron {
  flex-shrink: 0;
  color: var(--blue);
  display: inline-flex;
  margin-top: 0.15rem;
  transition: transform 0.2s ease;
}

.group-picker__trigger[aria-expanded="true"] .group-picker__chevron {
  transform: rotate(180deg);
}

.group-picker__panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  inset-inline: 0;
  z-index: 120;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.16);
  overflow: hidden;
}

.group-picker__search-wrap {
  padding: 0.55rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  position: sticky;
  top: 0;
  z-index: 1;
}

.group-picker__search {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.84rem;
  padding: 0.45rem 0.65rem;
  outline: none;
}

.group-picker__search:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.group-picker__list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  max-height: min(280px, 50vh);
  overflow-y: auto;
}

.group-picker__option {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: start;
  white-space: normal;
  word-break: break-word;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.group-picker__option:hover,
.group-picker__option:focus-visible {
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue-dark);
  outline: none;
}

.group-picker__option.is-selected {
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue-dark);
  font-weight: 700;
}

.group-picker__empty {
  padding: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

[data-theme="dark"] .group-picker__panel {
  background: var(--bg-card);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .group-picker__search-wrap {
  background: rgba(15, 23, 42, 0.55);
}

[data-theme="dark"] .group-picker__search {
  background: var(--bg-soft);
}

.catalog-toolbar__input {
  padding-inline-start: 2.35rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232563eb' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: inline-start 0.75rem center;
}

.catalog-group-block {
  margin-bottom: clamp(1.35rem, 3vw, 2rem);
}

.catalog-group-title {
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid rgba(37, 99, 235, 0.12);
}

.catalog-group-block .services-stories {
  margin-bottom: 0;
}

.catalog-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.85rem;
}

.service-product-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 4px 16px var(--shadow-soft);
  cursor: pointer;
  text-align: start;
  font-family: inherit;
  color: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.service-product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 10px 28px var(--shadow-medium);
}

.service-product-card__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  background: var(--bg-soft);
}

.service-product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.service-product-card:hover .service-product-card__img {
  transform: scale(1.04);
}

.service-product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 108px;
  padding: 0.72rem 0.78rem 0.78rem;
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.22) 0%, var(--white) 55%);
}

.service-product-card__name {
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--blue-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-product-card__time {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  align-self: flex-start;
  max-width: 100%;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--blue-dark);
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.95) 0%, rgba(191, 219, 254, 0.72) 100%);
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-product-card__time svg {
  flex-shrink: 0;
  color: var(--blue);
}

.service-product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.15rem;
}

.service-product-card__price {
  font-size: 1rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.01em;
}

.service-product-card__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 10px;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.14);
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.service-product-card:hover .service-product-card__cart {
  color: var(--white);
  background: var(--primary-gradient);
  border-color: transparent;
}

[data-theme="dark"] .service-product-card {
  background: var(--bg-card);
  box-shadow: 0 6px 22px var(--shadow-medium);
}

[data-theme="dark"] .service-product-card__body {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.18) 0%, var(--bg-card) 55%);
}

[data-theme="dark"] .service-product-card__name {
  color: #e2e8f0;
}

[data-theme="dark"] .service-product-card__time {
  color: #bfdbfe;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28) 0%, rgba(59, 130, 246, 0.16) 100%);
  border-color: rgba(96, 165, 250, 0.28);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.18);
}

[data-theme="dark"] .service-product-card__time svg {
  color: #93c5fd;
}

[data-theme="dark"] .service-product-card__cart {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.22);
}

@media (min-width: 640px) {
  .catalog-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .catalog-toolbar {
    grid-template-columns: 1fr;
  }
}

.modal-service-meta .modal-price {
  margin-top: 0;
}

.modal-service-meta .modal-completion {
  justify-content: center;
}

.modal-price {
  display: block;
  margin-top: 0.5rem;
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.01em;
}

.modal-price.hidden,
.modal-completion.hidden { display: none; }

.modal-completion {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.28rem 0.35rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}

.modal-completion svg {
  flex-shrink: 0;
  color: var(--blue);
}

.modal-completion__label {
  color: var(--muted);
  font-weight: 600;
}

.modal-completion span:last-child {
  color: var(--blue-dark);
  font-weight: 700;
}

/* ─── Service Modal ─── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--page-pad);
  z-index: 1000;
}

.modal-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.15);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  inset-inline-end: 0.75rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box--service {
  max-width: min(94vw, 920px);
  max-height: 92vh;
  overflow-x: hidden;
  overflow-y: auto;
  display: block;
}

.modal-service-head {
  flex-shrink: 0;
  padding: 1rem 1.25rem 0.85rem;
  padding-inline-end: 3rem;
  border-bottom: 1px solid var(--border);
}

.modal-service-head .modal-service-meta {
  margin-top: 0.55rem;
  align-items: flex-start;
  text-align: start;
}

.modal-service-head .modal-completion {
  justify-content: flex-start;
}

.modal-service-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
}

.modal-service-order {
  padding: 1rem 1.25rem 1.15rem;
  border-inline-end: 1px solid var(--border);
}

.modal-service-aside {
  padding: 1rem 1.25rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-soft);
}

.modal-service-head h2 {
  font-size: clamp(0.95rem, 2.4vw, 1.12rem);
  font-weight: 800;
  line-height: 1.45;
  margin: 0 0 0.2rem;
  color: var(--blue-dark);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-service-head .modal-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-service-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.modal-subtitle {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-desc-box {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.modal-desc-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 0.42rem;
  letter-spacing: 0.03em;
  text-align: start;
}

.modal-desc-panel {
  min-height: 4.5rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text);
  white-space: normal;
  word-break: break-word;
}

.modal-desc-panel a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-desc-panel a:hover {
  color: var(--blue-dark);
}

.modal-desc-panel.is-empty {
  color: var(--muted);
  white-space: pre-wrap;
}

.modal-body {
  padding: 0.35rem 1.15rem 1.15rem;
  border-top: 1px solid var(--border);
  margin-top: 0.15rem;
}

.modal-service-order.modal-body,
.modal-service-order {
  border-top: none;
  margin-top: 0;
}

@media (max-width: 1024px) {
  .modal-box--service {
    max-width: min(96vw, 560px);
    max-height: 94vh;
  }

  .modal-service-layout {
    grid-template-columns: 1fr;
  }

  .modal-service-order {
    order: 1;
    border-inline-end: none;
    border-top: none;
    padding-top: 1rem;
    padding-bottom: 0.85rem;
  }

  .modal-service-aside {
    order: 2;
    padding-top: 0.85rem;
    padding-bottom: 1.15rem;
    border-top: 1px solid var(--border);
  }

  .modal-service-head h2 {
    text-align: center;
    padding-inline-end: 0;
    -webkit-line-clamp: 5;
  }

  .modal-service-head .modal-subtitle,
  .modal-service-head .modal-service-meta {
    text-align: center;
    align-items: center;
  }

  .modal-service-head .modal-completion {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .modal-subtitle,
  .modal-completion,
  .modal-price {
    text-align: center;
  }

  .modal-completion {
    justify-content: center;
  }
}

[data-theme="dark"] .modal-completion span:last-child {
  color: #bfdbfe;
}

[data-theme="dark"] .modal-completion svg {
  color: #93c5fd;
}

[data-theme="dark"] .modal-desc-panel {
  background: rgba(15, 23, 42, 0.55);
}

[data-theme="dark"] .modal-service-aside {
  background: rgba(15, 23, 42, 0.35);
}

.modal-step-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.modal-step-title span {
  color: var(--blue);
}

.btn-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-order:hover:not(:disabled) {
  background: var(--blue-dark);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.28);
}

.btn-order:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.order-balance-error {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #dc2626;
  text-align: center;
}

.order-balance-error.hidden {
  display: none;
}

.requirements-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.req-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.req-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.req-input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.req-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: var(--white);
}

.req-input.input-error {
  border-color: #ef4444;
}

.req-textarea {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.5;
}

.req-unit {
  font-size: 0.85rem;
  color: var(--blue);
  font-weight: 600;
  white-space: nowrap;
}

.req-error {
  display: block;
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.3rem;
}

.req-error.hidden { display: none; }

#requirements-section.hidden { display: none; }

.loading, .empty {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
  grid-column: 1 / -1;
}

.site-footer {
  text-align: center;
  padding: 1.25rem var(--page-pad);
  color: var(--muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--white);
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.5rem var(--page-pad);
  }

  .site-promo {
    padding-top: 0.35rem;
  }

  .news-ticker {
    border-radius: 14px;
    min-height: auto;
    padding: 0.5rem 0.75rem;
    gap: 0.55rem;
  }

  .news-ticker-badge {
    inset-inline-start: 0.65rem;
  }

  .news-ticker-track {
    padding-inline: 2.35rem;
    justify-content: center;
  }

  .news-ticker-text {
    text-align: center;
    margin-inline: auto;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-banners {
    margin-top: 0.5rem;
    border-radius: 20px;
    aspect-ratio: 12 / 5.2;
  }

  .home-mini-banners {
    margin-top: 0.7rem;
    border-radius: 16px;
    aspect-ratio: 48 / 5.2;
  }

  .about-features-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .about-feature-card {
    min-height: 9.25rem;
    padding: 1rem 1.05rem;
  }

  .how-steps {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .how-step:not(:last-child)::after {
    display: none;
  }

  .how-step {
    min-height: auto;
  }

  .home-why-us-inner {
    grid-template-columns: 1fr;
  }

  .banner-dots {
    bottom: 0.4rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .home-banners {
    border-radius: 22px;
    aspect-ratio: 12 / 5;
  }

  .home-mini-banners {
    aspect-ratio: 48 / 5;
  }

  .how-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .how-step:nth-child(2)::after,
  .how-step:nth-child(4)::after {
    display: none;
  }
}

@media (min-width: 1025px) {
  .home-banners {
    aspect-ratio: 16 / 5.5;
    max-height: 400px;
    border-radius: var(--banner-radius);
  }

  .home-mini-banners {
    margin-top: var(--banner-mini-gap);
    aspect-ratio: 64 / 5.5;
    max-height: 100px;
    border-radius: calc(var(--banner-radius) - 4px);
  }
}

@media (hover: none) {
  .service-product-card:hover { transform: none; }
  .about-feature-card:hover { transform: none; }
}

/* ─── Orders Page ─── */

.page-main-orders {
  max-width: 760px;
  margin-inline: auto;
}

.orders-heading p {
  color: var(--muted);
  font-size: 0.9rem;
}

.orders-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.orders-filter-btn {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.orders-filter-btn:hover,
.orders-filter-btn:focus-visible {
  border-color: rgba(29, 127, 184, 0.35);
  outline: none;
}

.orders-filter-btn.is-active {
  background: linear-gradient(135deg, #2a9fd6 0%, #1d7fb8 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(29, 127, 184, 0.28);
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.orders-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}

.orders-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  box-shadow: 0 4px 18px rgba(15, 76, 117, 0.06);
  border-inline-start: 4px solid #1d7fb8;
}

.orders-card--compact {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0.55rem 0.75rem 0;
  border-radius: 10px;
  text-align: inherit;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
}

.orders-card-compact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  padding-bottom: 0.55rem;
}

.orders-card--processing {
  border-inline-start-color: #2563eb;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

.orders-card--processing .orders-card-compact-inner {
  padding-bottom: 0.45rem;
}

.orders-card-progress {
  position: relative;
  height: 4px;
  width: calc(100% + 1.5rem);
  margin-inline: -0.75rem;
  margin-top: 0;
  overflow: hidden;
  background: rgba(37, 99, 235, 0.1);
}

.orders-card-progress-track {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(37, 99, 235, 0.05) 0%,
    rgba(37, 99, 235, 0.14) 50%,
    rgba(37, 99, 235, 0.05) 100%
  );
}

.orders-card-progress-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa 0%, #2563eb 45%, #1d4ed8 100%);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.45);
  animation: orders-progress-slide 1.8s ease-in-out infinite;
}

.orders-card-progress--modal {
  width: 100%;
  margin-inline: 0;
  border-radius: 999px;
  height: 5px;
}

.order-detail-processing {
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(219, 234, 254, 0.7) 100%);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

[data-theme="dark"] .order-detail-processing {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.28) 0%, rgba(30, 64, 175, 0.18) 100%);
  border-color: rgba(96, 165, 250, 0.22);
}

.order-detail-processing-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1d4ed8;
}

[data-theme="dark"] .order-detail-processing-label {
  color: #93c5fd;
}

.order-detail-processing-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
  animation: orders-processing-pulse 1.6s ease-out infinite;
}

@keyframes orders-progress-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(280%); }
}

@keyframes orders-processing-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.orders-card--compact:hover,
.orders-card--compact:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 76, 117, 0.1);
  outline: none;
}

.orders-card-compact-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  min-width: 0;
  flex: 1;
}

.orders-card-compact-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.5rem;
  flex-shrink: 0;
}

.orders-card--compact .orders-card-id {
  font-size: 0.82rem;
}

.orders-card--compact .orders-card-title {
  font-size: 0.86rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 260px);
}

.orders-card--compact .orders-card-status {
  font-size: 0.68rem;
  padding: 0.14rem 0.45rem;
}

.orders-card--compact .orders-card-price {
  font-size: 0.8rem;
}

.orders-card--compact .orders-card-date {
  font-size: 0.7rem;
}

.modal-box--order-detail {
  max-width: 480px;
  padding: 1.15rem 1.2rem 1.25rem;
}

.order-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
  padding-inline-start: 1.5rem;
}

.order-detail-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.order-detail-date {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.order-detail-grid {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: var(--bg-soft);
}

.order-detail-grid div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
}

.order-detail-grid span {
  color: var(--muted);
  font-weight: 600;
}

.order-detail-grid strong {
  color: var(--text);
  font-weight: 800;
}

.order-detail-section {
  margin-bottom: 0.85rem;
}

.order-detail-section h4 {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
}

.order-detail-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.order-detail-reply-head h4 {
  margin: 0;
}

.order-detail-reply-box {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.08);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.6;
  word-break: break-word;
}

.order-detail-reply-box:not(.rich-content) {
  white-space: pre-wrap;
}

.order-detail-reply-box--empty {
  border-color: var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-style: italic;
}

.order-detail-refund {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #047857;
}

.order-timing-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.order-timing-item {
  min-width: 0;
  text-align: center;
}

.order-timing-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.order-timing-value {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text);
  direction: ltr;
  word-break: break-word;
  line-height: 1.45;
}

.order-timing-value--duration {
  font-size: 0.92rem;
  color: #1d4ed8;
}

[data-theme="dark"] .order-timing-value--duration {
  color: #60a5fa;
}

.orders-card--accepted {
  border-inline-start-color: #16a34a;
}

.orders-card--rejected {
  border-inline-start-color: #dc2626;
}

.orders-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.orders-card-id-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.orders-card-id {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f4c75;
  letter-spacing: 0.02em;
}

.orders-card-status {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.orders-card-status--processing {
  background: rgba(42, 159, 214, 0.16);
  color: #0f5f91;
}

.orders-card-status--accepted {
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}

.orders-card-status--rejected {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.orders-card-date {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.orders-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 0.35rem;
}

.orders-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.orders-card-price {
  font-weight: 700;
  color: #0f5f91;
}

.orders-card-reqs {
  list-style: none;
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: var(--bg-soft);
  border-radius: 10px;
  display: grid;
  gap: 0.45rem;
}

.orders-card-reqs li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.orders-card-req-label {
  color: var(--muted);
  font-weight: 600;
}

.orders-card-req-value {
  color: var(--text);
  font-weight: 700;
  word-break: break-word;
}

.orders-card-req-empty {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.orders-card-delivery {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.08);
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
}

.orders-card-refund {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #047857;
}

.member-toolbar {
  margin-bottom: 1rem;
  display: grid;
  gap: 0.9rem;
}

.member-search-row {
  display: flex;
}

.member-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.member-search svg {
  flex-shrink: 0;
  color: var(--muted);
}

.member-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  min-width: 0;
}

.member-search-input:focus {
  outline: none;
}

.member-date-toolbar {
  display: grid;
  gap: 0.75rem;
}

.member-date-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.member-date-range {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
}

.member-date-field {
  display: grid;
  gap: 0.3rem;
  min-width: 9.5rem;
}

.member-date-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.member-date-field input {
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.member-list-meta {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.orders-list--payments .orders-card--compact {
  width: 100%;
}

.orders-list--payments .orders-card--compact .orders-card-title {
  max-width: none;
  white-space: normal;
}

.order-detail-receipt a {
  display: block;
}

.order-detail-receipt img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.payments-credits-list {
  display: grid;
  gap: 0.75rem;
}

.payment-credit-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  box-shadow: 0 4px 18px rgba(15, 76, 117, 0.06);
  border-inline-start: 4px solid #16a34a;
}

.payment-credit-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.payment-credit-type {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.payment-credit-amount {
  font-size: 1.2rem;
  font-weight: 900;
  color: #059669;
  white-space: nowrap;
}

.payment-credit-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ─── Member pages (wallet, payments, profile, security) ─── */
.member-page { max-width: 920px; margin-inline: auto; }
.member-heading { margin-bottom: 1.25rem; }
.member-heading h2 { font-size: 1.5rem; font-weight: 800; color: var(--text); margin: 0 0 0.35rem; }
.member-heading p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.card-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.member-grid { display: grid; gap: 1rem; }
@media (min-width: 768px) {
  .member-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
  .member-grid--single { grid-template-columns: 1fr; max-width: 560px; }
}
.member-section { margin-top: 1.25rem; }
.member-section-head h3 { margin: 0 0 0.75rem; font-size: 1rem; font-weight: 700; color: var(--text); }
.member-empty, .member-hint { color: var(--muted); font-size: 0.88rem; margin: 0.75rem 0 0; }
.member-actions-row { margin-bottom: 1rem; }
.btn-member-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.65rem 1.15rem; border-radius: 12px; border: none;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff; font-weight: 700; font-size: 0.9rem; text-decoration: none;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.btn-member-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37, 99, 235, 0.32); }
.btn-member-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-member-primary--full { width: 100%; }
.btn-member-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.6rem 1rem; border-radius: 12px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text); font-weight: 600; font-size: 0.88rem; cursor: pointer;
}
.btn-member-outline--sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
.wallet-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.wallet-hero-label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.25rem; }
.wallet-hero-value { margin: 0; font-size: 2rem; font-weight: 900; color: #1d4ed8; letter-spacing: -0.02em; }
[data-theme="dark"] .wallet-hero-value { color: #60a5fa; }
.wallet-tx {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--border);
}
.wallet-tx:last-child { border-bottom: none; }
.wallet-tx-type { font-weight: 700; color: var(--text); font-size: 0.9rem; }
.wallet-tx-note { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }
.wallet-tx-meta { text-align: end; }
.wallet-tx-amount { display: block; font-weight: 800; font-size: 0.95rem; }
.wallet-tx-amount--in { color: #059669; }
.wallet-tx-amount--out { color: #dc2626; }
.wallet-tx-date, .wallet-tx-balance { display: block; font-size: 0.75rem; color: var(--muted); }
.member-form .form-field { margin-bottom: 0.9rem; }
.member-form label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 0.35rem; }
.member-form input, .member-form textarea {
  width: 100%; padding: 0.65rem 0.8rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; box-sizing: border-box;
}
.member-form input:focus, .member-form textarea:focus {
  outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.field-hint { margin: 0.35rem 0 0; font-size: 0.78rem; color: var(--muted); }
.amount-quick-picks { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }
.amount-pick {
  padding: 0.45rem 0.85rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-weight: 600; font-size: 0.82rem; cursor: pointer;
}
.amount-pick:hover, .amount-pick.is-active { border-color: #3b82f6; color: #1d4ed8; background: #eff6ff; }
.deposit-instructions-text { font-size: 0.88rem; line-height: 1.65; color: var(--text); white-space: pre-wrap; }
.wallet-inline-balance { margin: 0 0 1rem; font-size: 0.9rem; color: var(--muted); }
.wallet-inline-balance strong { color: #1d4ed8; }
.payment-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1rem 1.1rem; margin-bottom: 0.75rem;
}
.payment-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.payment-card-id { font-weight: 800; color: var(--text); }
.payment-card-status { font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 999px; }
.payment-card-status--pending { background: #fef3c7; color: #b45309; }
.payment-card-status--approved { background: #d1fae5; color: #047857; }
.payment-card-status--rejected { background: #fee2e2; color: #b91c1c; }
.payment-card-amount { margin: 0; font-size: 1.35rem; font-weight: 900; color: #1d4ed8; }
.payment-card-date { font-size: 0.78rem; color: var(--muted); }
.payment-card-note, .payment-card-admin-note { margin: 0.35rem 0.75rem 0.55rem; font-size: 0.82rem; color: var(--muted); }
.payments-card--highlight {
  animation: payments-highlight 1.4s ease 2;
}
@keyframes payments-highlight {
  0%, 100% { box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1); }
  50% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35); }
}
.profile-meta { display: grid; gap: 0.65rem; margin: 0 0 1.1rem; }
.profile-meta div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.88rem; }
.profile-meta dt { color: var(--muted); font-weight: 600; }
.profile-meta dd { margin: 0; font-weight: 700; color: var(--text); }
.member-panel-title { margin: 0 0 0.85rem; font-size: 1rem; font-weight: 700; }
.device-card {
  padding: 0.9rem 0; border-bottom: 1px solid var(--border);
}
.device-card:last-child { border-bottom: none; }
.device-card-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.device-card-title { margin: 0; font-size: 0.9rem; font-weight: 700; }
.device-badge { font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; background: #dbeafe; color: #1d4ed8; }
.device-card-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.78rem; color: var(--muted); margin: 0 0 0.5rem; }
.side-nav-member-username--link { color: inherit; text-decoration: none; }
.side-nav-member-username--link:hover { color: #2563eb; }

/* Wallet checkout in service modal */
.wallet-checkout {
  margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 12px;
  background: #f0f9ff; border: 1px solid #bae6fd;
}
[data-theme="dark"] .wallet-checkout { background: rgba(30, 58, 138, 0.2); border-color: rgba(96, 165, 250, 0.3); }
.wallet-checkout-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.5rem; }
@media (max-width: 520px) { .wallet-checkout-grid { grid-template-columns: 1fr; } }
.wallet-checkout-item { text-align: center; font-size: 0.78rem; color: var(--muted); }
.wallet-checkout-item strong { display: block; margin-top: 0.2rem; font-size: 1rem; color: var(--text); }
.wallet-checkout-item--after strong { color: #1d4ed8; }
.wallet-checkout-warning { margin: 0.65rem 0 0; font-size: 0.82rem; font-weight: 600; color: #dc2626; }
.wallet-checkout-link { display: inline-block; margin-top: 0.35rem; font-size: 0.82rem; font-weight: 700; color: #1d4ed8; text-decoration: none; }
.wallet-checkout-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--blue-dark);
}

/* ─── Add balance (topup) ─── */
.topup-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
}
.topup-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 4.5rem;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.topup-step-indicator.is-active,
.topup-step-indicator.is-done { opacity: 1; }
.topup-step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--muted);
}
.topup-step-indicator.is-active .topup-step-num {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.topup-step-indicator.is-done .topup-step-num {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.topup-step-label { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-align: center; }
.topup-step-indicator.is-active .topup-step-label { color: #1d4ed8; }
.topup-step-line {
  flex: 1;
  max-width: 2rem;
  height: 2px;
  background: var(--border);
  margin-bottom: 1.1rem;
}
.topup-steps--4 .topup-step-indicator { min-width: 3.6rem; }
.topup-steps--4 .topup-step-label { font-size: 0.68rem; }
@media (max-width: 520px) {
  .topup-steps--4 { flex-wrap: wrap; gap: 0.5rem; }
  .topup-steps--4 .topup-step-line { display: none; }
}
.topup-info-summary {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
[data-theme="dark"] .topup-info-summary { background: rgba(15, 23, 42, 0.5); }
.topup-info-line { margin: 0; font-size: 0.88rem; font-weight: 600; color: var(--text); }
.topup-info-line + .topup-info-line { margin-top: 0.35rem; }
.topup-info-line--amount { color: #1d4ed8; font-size: 1rem; font-weight: 800; }
.topup-payment-details--nested {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border-style: dashed;
}
[data-theme="dark"] .topup-payment-details--nested { background: rgba(15, 23, 42, 0.5); }
.topup-payment-description {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}

.topup-payment-description:not(.rich-content) {
  white-space: pre-wrap;
}
.topup-payment-account-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.topup-payment-account-row {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
}
.topup-payment-account-value {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.85rem 0.95rem;
  min-height: 3.25rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
  direction: ltr;
  text-align: left;
  display: flex;
  align-items: center;
}
[data-theme="dark"] .topup-payment-account-value { background: rgba(30, 41, 59, 0.9); }
.topup-copy-btn {
  flex-shrink: 0;
  align-self: stretch;
  min-width: 4.5rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 12px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.topup-copy-btn:hover { background: #1e40af; transform: translateY(-1px); }
.topup-contact-modal { max-width: 400px; padding: 1.65rem 1.35rem 1.5rem; text-align: center; }
.topup-contact-modal-body { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; }
.topup-contact-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 0.35rem;
}
.topup-contact-title { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--text); }
.topup-contact-message { margin: 0; font-size: 0.9rem; line-height: 1.7; color: var(--muted); max-width: 30ch; }
.topup-contact-whatsapp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  width: 100%;
  margin-top: 0.35rem;
}
.topup-contact-whatsapp-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.65rem;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
[data-theme="dark"] .topup-contact-whatsapp-item {
  background: rgba(6, 78, 59, 0.2);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}
.topup-contact-whatsapp-item:hover {
  background: #d1fae5;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.15);
}
[data-theme="dark"] .topup-contact-whatsapp-item:hover { background: rgba(6, 78, 59, 0.35); }
.topup-contact-whatsapp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}
.topup-contact-whatsapp-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
}
.topup-payment-empty {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}
.topup-payment-main {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}
.topup-payment-account {
  flex: 1 1 14rem;
  min-width: 0;
}
.topup-payment-barcode {
  flex: 0 0 auto;
}
.topup-payment-barcode img {
  display: block;
  width: 224px;
  height: 224px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.5rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}
[data-theme="dark"] .topup-payment-barcode img {
  background: rgba(30, 41, 59, 0.9);
}
.topup-receipt-pdf {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  padding: 1rem;
  color: var(--text);
}
.topup-receipt-pdf p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  word-break: break-all;
}
.order-detail-receipt-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-weight: 700;
}
[data-theme="dark"] .order-detail-receipt-pdf { background: rgba(15, 23, 42, 0.5); }
.topup-receipt-admin-pdf {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.topup-panel { margin-bottom: 1rem; }
.topup-panel.hidden { display: none; }
.topup-panel-title { margin: 0 0 1rem; font-size: 1rem; font-weight: 800; color: var(--text); }
.topup-methods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 600px) {
  .topup-methods-grid { grid-template-columns: repeat(4, 1fr); }
}
.topup-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem 0.65rem;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.topup-method-card:hover { border-color: #93c5fd; transform: translateY(-1px); }
.topup-method-card.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
}
[data-theme="dark"] .topup-method-card.is-selected { background: rgba(30, 58, 138, 0.25); }
.topup-method-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
}
.topup-method-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
.topup-method-icon { color: #1d4ed8; display: inline-flex; }
.topup-method-label { font-size: 0.82rem; font-weight: 700; color: var(--text); text-align: center; }
.topup-selected-method { margin: 0 0 0.85rem; font-size: 0.88rem; font-weight: 600; color: #1d4ed8; }
.topup-instructions--nested {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border-style: dashed;
}
[data-theme="dark"] .topup-instructions--nested { background: rgba(15, 23, 42, 0.5); }
.topup-instructions h4 { margin: 0 0 0.45rem; font-size: 0.82rem; font-weight: 800; color: var(--text); }
.topup-panel-actions { margin-top: 1rem; display: flex; justify-content: flex-end; }
.topup-panel-actions--split { justify-content: space-between; gap: 0.75rem; }
.topup-receipt-upload {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 1rem;
}
.topup-receipt-upload.is-dragover,
.topup-receipt-upload:hover { border-color: #3b82f6; background: #f0f9ff; }
[data-theme="dark"] .topup-receipt-upload:hover { background: rgba(30, 58, 138, 0.2); }
.topup-receipt-placeholder p { margin: 0.5rem 0 0.2rem; font-weight: 600; color: var(--text); }
.topup-receipt-placeholder svg { color: #64748b; }
.topup-receipt-formats { font-size: 0.75rem; color: var(--muted); }
.topup-receipt-preview { position: relative; display: inline-block; }
.topup-receipt-preview img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  object-fit: contain;
}
.topup-receipt-remove {
  position: absolute;
  top: -0.5rem;
  inset-inline-end: -0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: none;
  background: #dc2626;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

/* ─── Wallet stats ─── */
.wallet-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) {
  .wallet-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
.wallet-stats-grid--analytics {
  margin-bottom: 0;
}
.wallet-stat-card {
  position: relative;
  padding: 1.15rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}
.wallet-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, #1d4ed8, #60a5fa);
}
.wallet-stat-card--balance::before { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.wallet-stat-card--topup::before { background: linear-gradient(90deg, #059669, #34d399); }
.wallet-stat-card--spent::before { background: linear-gradient(90deg, #dc2626, #f87171); }
.wallet-stat-card--orders-total::before { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.wallet-stat-card--orders-success::before { background: linear-gradient(90deg, #059669, #34d399); }
.wallet-stat-card--orders-failed::before { background: linear-gradient(90deg, #dc2626, #f87171); }
.wallet-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  margin-bottom: 0.65rem;
}
.wallet-stat-card--topup .wallet-stat-icon { background: #ecfdf5; color: #059669; }
.wallet-stat-card--spent .wallet-stat-icon { background: #fef2f2; color: #dc2626; }
.wallet-stat-card--orders-total .wallet-stat-icon { background: #eef2ff; color: #4f46e5; }
.wallet-stat-card--orders-success .wallet-stat-icon { background: #ecfdf5; color: #059669; }
.wallet-stat-card--orders-failed .wallet-stat-icon { background: #fef2f2; color: #dc2626; }
.wallet-stat-label { margin: 0; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.wallet-stat-value {
  margin: 0.25rem 0 0;
  font-size: 1.65rem;
  font-weight: 900;
  color: #1d4ed8;
  letter-spacing: -0.02em;
  transition: transform 0.25s ease;
}
.wallet-stat-value--in { color: #059669; }
.wallet-stat-value--out { color: #dc2626; }
.wallet-stat-value--pulse { animation: walletStatPulse 0.45s ease; }
@keyframes walletStatPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.wallet-stat-hint { margin: 0.35rem 0 0; font-size: 0.72rem; color: var(--muted); }
.wallet-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Order delivery & refund */
.orders-card-delivery {
  margin-top: 0.75rem; padding: 0.75rem; border-radius: 10px;
  background: #ecfdf5; border: 1px solid #a7f3d0;
}
[data-theme="dark"] .orders-card-delivery { background: rgba(6, 78, 59, 0.25); border-color: rgba(52, 211, 153, 0.35); }
.orders-card-delivery-label { display: block; font-size: 0.75rem; font-weight: 700; color: #047857; margin-bottom: 0.25rem; }
.orders-card-delivery-value { margin: 0; font-size: 0.88rem; word-break: break-word; }
.orders-card-delivery-value:not(.rich-content) { white-space: pre-wrap; }
.orders-card-refund { margin: 0.5rem 0 0; font-size: 0.8rem; font-weight: 600; color: #059669; }

/* ─── Social rail (floating side icons) ─── */

.social-rail {
  position: fixed;
  inset-inline-start: 0.85rem;
  inset-inline-end: auto;
  top: 50%;
  transform: translateY(-50%);
  z-index: 145;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  direction: ltr;
}

.social-rail-item {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  height: 3.15rem;
  min-width: 3.15rem;
  max-width: 3.15rem;
  padding: 0.22rem;
  border-radius: 999px;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(37, 99, 235, 0.14);
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(37, 99, 235, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    max-width 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    background 0.28s ease;
}

[data-theme="dark"] .social-rail-item {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(96, 165, 250, 0.18);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(96, 165, 250, 0.08);
}

.social-rail-item:hover,
.social-rail-item:focus-visible {
  max-width: 14.5rem;
  outline: none;
}

.social-rail-icon-wrap {
  width: 2.7rem;
  height: 2.7rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.social-rail-item:hover .social-rail-icon-wrap,
.social-rail-item:focus-visible .social-rail-icon-wrap {
  transform: scale(1.04);
}

.social-rail-icon-wrap svg {
  display: block;
  pointer-events: none;
}

.social-rail-pop {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  min-width: 0;
  padding-inline: 0.7rem 0.15rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

html[dir="rtl"] .social-rail-pop {
  align-items: flex-end;
  text-align: end;
  transform: translateX(-8px);
}

html[dir="ltr"] .social-rail-pop {
  align-items: flex-start;
  text-align: start;
  transform: translateX(8px);
}

.social-rail-item:hover .social-rail-pop,
.social-rail-item:focus-visible .social-rail-pop {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.social-rail-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: none;
}

.social-rail-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: none;
}

.social-rail-item--whatsapp .social-rail-icon-wrap {
  background: linear-gradient(145deg, #34d399 0%, #059669 100%);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}
.social-rail-item--whatsapp:hover,
.social-rail-item--whatsapp:focus-visible {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.22);
}

.social-rail-item--telegram .social-rail-icon-wrap {
  background: linear-gradient(145deg, #38bdf8 0%, #0284c7 100%);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35);
}
.social-rail-item--telegram:hover,
.social-rail-item--telegram:focus-visible {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.22);
}

.social-rail-item--facebook .social-rail-icon-wrap {
  background: linear-gradient(145deg, #60a5fa 0%, #1d4ed8 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}
.social-rail-item--facebook:hover,
.social-rail-item--facebook:focus-visible {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

.social-rail-item--youtube .social-rail-icon-wrap {
  background: linear-gradient(145deg, #f87171 0%, #dc2626 100%);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}
.social-rail-item--instagram .social-rail-icon-wrap {
  background: linear-gradient(145deg, #f472b6 0%, #db2777 55%, #7c3aed 100%);
  box-shadow: 0 6px 18px rgba(219, 39, 119, 0.32);
}
.social-rail-item--tiktok .social-rail-icon-wrap {
  background: linear-gradient(145deg, #334155 0%, #0f172a 100%);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
}
.social-rail-item--twitter .social-rail-icon-wrap {
  background: linear-gradient(145deg, #475569 0%, #0f172a 100%);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.32);
}
.social-rail-item--linkedin .social-rail-icon-wrap {
  background: linear-gradient(145deg, #60a5fa 0%, #0a66c2 100%);
  box-shadow: 0 6px 18px rgba(10, 102, 194, 0.32);
}
.social-rail-item--snapchat .social-rail-icon-wrap {
  background: linear-gradient(145deg, #fde047 0%, #ca8a04 100%);
  color: #1f2937;
  box-shadow: 0 6px 18px rgba(202, 138, 4, 0.28);
}
.social-rail-item--email .social-rail-icon-wrap {
  background: linear-gradient(145deg, #fb7185 0%, #e11d48 100%);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.3);
}
.social-rail-item--phone .social-rail-icon-wrap {
  background: linear-gradient(145deg, #4ade80 0%, #16a34a 100%);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.3);
}
.social-rail-item--link .social-rail-icon-wrap {
  background: linear-gradient(145deg, #60a5fa 0%, #2563eb 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

@media (max-width: 768px) {
  .social-rail {
    inset-inline-start: 0.5rem;
    gap: 0.5rem;
  }

  .social-rail-item {
    height: 2.85rem;
    min-width: 2.85rem;
    max-width: 2.85rem;
  }

  .social-rail-icon-wrap {
    width: 2.45rem;
    height: 2.45rem;
  }

  .social-rail-item:hover,
  .social-rail-item:focus-visible {
    max-width: 12rem;
  }
}

/* ─── Site Toast Notifications ─── */

.site-toast-root {
  position: fixed;
  top: calc(4.5rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(92vw, 420px);
  pointer-events: none;
}

.site-toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.14),
    0 4px 14px rgba(37, 99, 235, 0.08);
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-14px) scale(0.98);
  transition:
    opacity 0.32s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-toast--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.site-toast--leaving {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}

.site-toast__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
}

.site-toast--success .site-toast__icon {
  background: rgba(34, 197, 94, 0.14);
  color: #16a34a;
}

.site-toast--error .site-toast__icon {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.site-toast--info .site-toast__icon {
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue);
}

[data-theme="dark"] .site-toast--success .site-toast__icon {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

[data-theme="dark"] .site-toast--error .site-toast__icon {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.site-toast__content {
  flex: 1;
  min-width: 0;
  padding-top: 0.15rem;
}

.site-toast__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.site-toast__message {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}

.site-toast__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  margin: -0.15rem -0.1rem 0 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-toast__close:hover,
.site-toast__close:focus-visible {
  background: var(--bg-card-hover);
  color: var(--text);
  outline: none;
}

.site-toast__progress {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
  transform-origin: inline-end center;
  animation: site-toast-progress var(--site-toast-duration, 5s) linear forwards;
}

.site-toast--error .site-toast__progress {
  background: linear-gradient(90deg, #f87171 0%, #dc2626 100%);
}

.site-toast--info .site-toast__progress {
  background: var(--primary-gradient);
}

@keyframes site-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 640px) {
  .site-toast-root {
    top: calc(4rem + env(safe-area-inset-top, 0px));
    width: min(94vw, 420px);
  }

  .site-toast {
    padding: 0.9rem 0.95rem 1rem;
    border-radius: 14px;
  }

  .site-toast__title {
    font-size: 0.95rem;
  }

  .site-toast__message {
    font-size: 0.88rem;
  }
}

body.menu-open .social-rail {
  z-index: 120;
}

/* Rich admin text — customer-facing display */
.rich-content {
  font-size: inherit;
  line-height: 1.75;
  color: inherit;
  word-break: break-word;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.rich-content::after {
  content: "";
  display: table;
  clear: both;
}

.rich-content > :first-child {
  margin-top: 0;
}

.rich-content > :last-child {
  margin-bottom: 0;
}

.rich-content img {
  display: inline-block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  margin: 0.45rem 0;
  border-radius: 12px;
  vertical-align: middle;
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

.rich-content p,
.rich-content div {
  margin: 0 0 0.65rem;
}

.rich-content h1,
.rich-content h2,
.rich-content h3 {
  margin: 0.35rem 0 0.5rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--text);
}

.rich-content h1 { font-size: 1.15rem; }
.rich-content h2 { font-size: 1.05rem; }
.rich-content h3 { font-size: 0.98rem; }

.rich-content ul,
.rich-content ol {
  margin: 0.35rem 0 0.75rem;
  padding-inline-start: 1.35rem;
}

.rich-content li + li {
  margin-top: 0.25rem;
}

.rich-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  pointer-events: auto;
  cursor: pointer;
}

.rich-content a:hover {
  color: var(--blue-dark);
}

@keyframes rich-neon-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.rich-neon-flow {
  display: inline-block;
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: rich-neon-shift 3.2s linear infinite;
  filter: drop-shadow(0 0 5px var(--rich-neon-glow, rgba(37, 99, 235, 0.55)))
          drop-shadow(0 0 14px var(--rich-neon-glow-soft, rgba(124, 58, 237, 0.35)));
}

.rich-neon-flow--blue-violet {
  --rich-neon-glow: rgba(124, 58, 237, 0.72);
  --rich-neon-glow-soft: rgba(37, 99, 235, 0.42);
  background-image: linear-gradient(90deg, #2563eb, #7c3aed, #06b6d4, #ec4899, #2563eb, #7c3aed);
}

.rich-neon-flow--blue-cyan {
  --rich-neon-glow: rgba(6, 182, 212, 0.72);
  --rich-neon-glow-soft: rgba(29, 78, 216, 0.42);
  background-image: linear-gradient(90deg, #1d4ed8, #06b6d4, #22d3ee, #3b82f6, #1d4ed8, #06b6d4);
}

.rich-neon-flow--green-blue {
  --rich-neon-glow: rgba(5, 150, 105, 0.72);
  --rich-neon-glow-soft: rgba(37, 99, 235, 0.42);
  background-image: linear-gradient(90deg, #059669, #10b981, #2563eb, #06b6d4, #059669, #10b981);
}

.rich-neon-flow--orange-red {
  --rich-neon-glow: rgba(249, 115, 22, 0.78);
  --rich-neon-glow-soft: rgba(220, 38, 38, 0.45);
  background-image: linear-gradient(90deg, #f97316, #fb923c, #dc2626, #f59e0b, #f97316, #fb923c);
}

.rich-neon-flow--pink-violet {
  --rich-neon-glow: rgba(236, 72, 153, 0.78);
  --rich-neon-glow-soft: rgba(139, 92, 246, 0.45);
  background-image: linear-gradient(90deg, #ec4899, #f472b6, #8b5cf6, #a855f7, #ec4899, #f472b6);
}

.rich-neon-flow--gold-orange {
  --rich-neon-glow: rgba(245, 158, 11, 0.78);
  --rich-neon-glow-soft: rgba(234, 88, 12, 0.45);
  background-image: linear-gradient(90deg, #f59e0b, #fbbf24, #ea580c, #f97316, #f59e0b, #fbbf24);
}

.rich-neon-flow--teal-blue {
  --rich-neon-glow: rgba(20, 184, 166, 0.75);
  --rich-neon-glow-soft: rgba(59, 130, 246, 0.45);
  background-image: linear-gradient(135deg, #14b8a6, #2dd4bf, #3b82f6, #06b6d4, #14b8a6, #2dd4bf);
}

.rich-neon-flow--night-blue {
  --rich-neon-glow: rgba(37, 99, 235, 0.75);
  --rich-neon-glow-soft: rgba(15, 23, 42, 0.55);
  background-image: linear-gradient(135deg, #0f172a, #1e3a8a, #2563eb, #38bdf8, #0f172a, #1e3a8a);
}

.rich-content span[style*="background-clip"],
.rich-content span[style*="-webkit-background-clip"] {
  display: inline-block;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.rich-content img.admin-rich-thumb {
  max-width: min(100%, 240px);
  border: none;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  outline: none;
}

.rich-content img.admin-rich-thumb[style*="width"] {
  max-width: 100%;
  height: auto;
}

.rich-content img.admin-rich-thumb[style*="float: left"],
.rich-content img.admin-rich-thumb[style*="float:left"],
.rich-content img.admin-rich-thumb[style*="float: right"],
.rich-content img.admin-rich-thumb[style*="float:right"] {
  max-width: min(100%, 240px);
}

.modal-desc-panel.rich-content img {
  max-height: 180px;
}

.broadcast-popup-message.rich-content img,
.personal-notification-message.rich-content img,
.gift-code-message.rich-content img,
.order-detail-reply-box.rich-content img,
.topup-payment-description.rich-content img {
  max-height: 160px;
}

.rich-content [style*="text-align: center"],
.rich-content [style*="text-align:center"] {
  text-align: center;
}

.rich-content [style*="text-align: left"],
.rich-content [style*="text-align:left"] {
  text-align: left;
}

.rich-content [style*="text-align: right"],
.rich-content [style*="text-align:right"] {
  text-align: right;
}

.rich-content [style*="text-align: justify"],
.rich-content [style*="text-align:justify"] {
  text-align: justify;
}
