/* ═══════════════════════════════════════════════════════════════════════
   Flat Fusion — shared theme (v4)
   "Blue night" — deep navy surfaces, electric blue accents and clean white
   type. One palette for the storefront, account, orders and admin panel.
   Mobile first: every layout is designed for a 360px phone and scales up.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --ink: #050912;
  --ink-2: #070d1c;
  --panel: rgba(13, 21, 38, 0.86);
  --panel-solid: #0d1526;
  --panel-soft: rgba(255, 255, 255, 0.03);

  /* Accent tokens keep their historical names so every page picks up the
     blue palette without edits. */
  --gold: #5b8cff;
  --gold-strong: #8fb2ff;
  --gold-deep: #4f7cff;
  --gold-soft: rgba(91, 140, 255, 0.14);
  --gold-line: rgba(126, 168, 255, 0.16);
  --gold-line-strong: rgba(126, 168, 255, 0.34);

  --violet: #7c3aed;
  --text: #eaf0ff;
  --muted: #9fb0cf;
  --muted-2: #6f80a0;

  --emerald: #38e0b0;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;

  --border: rgba(140, 168, 220, 0.14);
  --border-strong: rgba(150, 180, 240, 0.26);

  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --shadow-lg: 0 24px 70px rgba(2, 6, 18, 0.6);
  --shadow-md: 0 14px 36px rgba(2, 6, 18, 0.45);

  --font-display: "Sora", "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", "Outfit", ui-sans-serif, system-ui, sans-serif;
}

/* ─────────────────────────  base (store / account)  ───────────────── */
[hidden] { display: none !important; }

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

html { -webkit-text-size-adjust: 100%; }

body { margin: 0; }

.ff-app {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font-body);
  background-color: var(--ink);
  background-image:
    radial-gradient(900px 520px at 8% -12%, rgba(79, 124, 255, 0.16), transparent 62%),
    radial-gradient(760px 460px at 96% 2%, rgba(124, 58, 237, 0.14), transparent 62%),
    linear-gradient(180deg, #060b17 0%, #050912 52%, #04070f 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.ff-app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(rgba(150, 180, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 180, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(900px 600px at 50% 0%, #000 18%, transparent 76%);
  -webkit-mask-image: radial-gradient(900px 600px at 50% 0%, #000 18%, transparent 76%);
}

.ff-app a { color: inherit; text-decoration: none; }
.ff-app button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.ff-app input, .ff-app select, .ff-app textarea { font-family: inherit; }
.ff-app h1, .ff-app h2, .ff-app h3, .ff-app h4 {
  font-family: var(--font-display);
  letter-spacing: -0.022em;
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.ff-app img { max-width: 100%; }

.ff-shell { position: relative; z-index: 2; width: min(1160px, 100%); margin: 0 auto; padding: 0 20px; }

/* ─────────────────────────────  header  ───────────────────────────── */
.ff-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--gold-line);
  background: rgba(5, 9, 18, 0.82);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.ff-header-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ff-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }

.ff-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  border: 1px solid var(--gold-line-strong);
  background: linear-gradient(150deg, rgba(91, 140, 255, 0.24), rgba(255, 255, 255, 0.02));
  color: #cfe0ff;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.ff-brand-text { display: grid; line-height: 1.15; min-width: 0; }
.ff-brand-text strong { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ff-brand-text small { margin-top: 2px; font-size: 8.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2); }

.ff-nav { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.ff-nav a {
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.18s, background 0.18s;
}
.ff-nav a:hover { color: var(--text); background: rgba(140, 175, 255, 0.08); }
.ff-nav a.active { color: #dbe7ff; background: var(--gold-soft); }

.ff-head-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }

.ff-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(140, 175, 255, 0.06);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  max-width: 46vw;
  transition: border-color 0.18s, background 0.18s;
}
.ff-account > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-account:hover { border-color: var(--gold-line-strong); background: rgba(140, 175, 255, 0.12); }
.ff-account-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #4f7cff, #7c3aed);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.ff-account-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ─────────────────────────────  buttons  ──────────────────────────── */
.ff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(140, 175, 255, 0.06);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background 0.18s, border-color 0.18s, box-shadow 0.18s, opacity 0.18s;
}
.ff-btn:hover { transform: translateY(-1px); background: rgba(140, 175, 255, 0.12); border-color: var(--border-strong); }
.ff-btn:active { transform: translateY(0) scale(0.99); }
.ff-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.ff-btn svg { flex: 0 0 auto; }

.ff-btn-gold {
  border-color: transparent;
  background: linear-gradient(135deg, #5b8cff, #4f5be8);
  color: #fff;
  box-shadow: 0 10px 26px rgba(59, 95, 220, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.ff-btn-gold:hover { background: linear-gradient(135deg, #6f9bff, #5661f0); border-color: transparent; box-shadow: 0 14px 32px rgba(59, 95, 220, 0.42); }

.ff-btn-ghost { background: transparent; border-color: var(--gold-line); color: #a9c3ff; }
.ff-btn-ghost:hover { background: var(--gold-soft); border-color: var(--gold-line-strong); color: #d3e2ff; }

.ff-btn-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.ff-btn-quiet:hover { background: rgba(140, 175, 255, 0.08); color: var(--text); }

.ff-btn-danger { border-color: rgba(251, 113, 133, 0.32); background: rgba(251, 113, 133, 0.1); color: #ffc2cc; }
.ff-btn-danger:hover { background: rgba(251, 113, 133, 0.18); border-color: rgba(251, 113, 133, 0.5); }

.ff-btn-sm { min-height: 32px; padding: 6px 12px; font-size: 11.5px; border-radius: 9px; }
.ff-btn-block { width: 100%; }

/* keep the old utility name used by some inline markup */
.ff-btn-gold.ff-btn-sm { min-height: 32px; }

/* ─────────────────────────────  surfaces  ─────────────────────────── */
.ff-card {
  position: relative;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-line);
  background: linear-gradient(180deg, rgba(16, 25, 44, 0.9), rgba(8, 14, 27, 0.94));
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-width: 0;
}
.ff-card + .ff-card { margin-top: 14px; }

.ff-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ff-eyebrow { margin: 0 0 6px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: #7ea4ff; }
.ff-title { margin: 0; font-family: var(--font-display); font-size: clamp(20px, 5vw, 30px); font-weight: 700; line-height: 1.15; }
.ff-sub { margin: 8px 0 0; max-width: 620px; color: var(--muted); font-size: 13px; line-height: 1.65; }

.ff-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--gold-line);
  background: var(--gold-soft);
  color: #a9c3ff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 100%;
}
.ff-chip.live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px rgba(56, 224, 176, 0.8); }

/* ────────────────────────────  store hub  ─────────────────────────── */
.shop-hero {
  position: relative;
  overflow: hidden;
  margin: 24px 0 22px;
  padding: clamp(22px, 5vw, 44px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--gold-line);
  background:
    radial-gradient(560px 300px at 88% -10%, rgba(91, 140, 255, 0.22), transparent 68%),
    linear-gradient(150deg, rgba(18, 28, 52, 0.96), rgba(6, 11, 22, 0.98));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.shop-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  box-shadow: 0 0 0 34px rgba(91, 140, 255, 0.04), 0 0 0 74px rgba(91, 140, 255, 0.025);
  pointer-events: none;
}
.shop-hero-title { position: relative; max-width: 720px; font-size: clamp(26px, 7vw, 46px); line-height: 1.04; margin: 10px 0 0; }
.shop-hero-title em { font-style: normal; color: #a9c3ff; }
.shop-hero-sub { position: relative; max-width: 600px; margin: 14px 0 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.shop-hero-meta { display: flex; flex-wrap: wrap; gap: 16px 26px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--gold-line); }
.shop-meta-item { min-width: 74px; }
.shop-meta-item span { display: block; font-size: 8.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); }
.shop-meta-item strong { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 17px; font-weight: 700; color: #dbe7ff; }
.shop-meta-item strong a { color: #a9c3ff; text-decoration: underline; text-decoration-color: var(--gold-line-strong); text-underline-offset: 3px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr)); gap: 14px; }

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-line);
  background: linear-gradient(180deg, rgba(16, 25, 44, 0.96), rgba(7, 13, 25, 0.98));
  box-shadow: var(--shadow-md);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.26s, box-shadow 0.26s;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--gold-line-strong); box-shadow: 0 22px 52px rgba(2, 6, 18, 0.55); }

.cat-media {
  position: relative;
  height: clamp(112px, 34vw, 140px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(380px 170px at 50% 120%, rgba(91, 140, 255, 0.28), transparent 72%),
    linear-gradient(135deg, #16233f, #0a1120);
  border-bottom: 1px solid var(--gold-line);
}
.cat-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.95; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.cat-card:hover .cat-media img { transform: scale(1.04); }
.cat-media-fallback { font-size: clamp(34px, 10vw, 44px); line-height: 1; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.5)); }
.cat-icon-badge {
  position: absolute;
  left: 12px;
  bottom: 10px;
  width: 42px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid var(--gold-line-strong);
  background: linear-gradient(150deg, #1a2848, #0c1526);
  font-size: 21px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(2, 6, 18, 0.6);
}
.cat-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1 1 auto; min-width: 0; }
.cat-name { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.cat-tagline { margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); }
.cat-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(150, 180, 240, 0.09); }
.cat-count { font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.cat-go { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; color: #a9c3ff; }
.cat-go svg { transition: transform 0.2s; }
.cat-card:hover .cat-go svg { transform: translateX(3px); }

/* ──────────────────────────  category page  ───────────────────────── */
.ff-breadcrumb { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 20px 0 16px; font-size: 11.5px; color: var(--muted-2); }
.ff-breadcrumb a:hover { color: #a9c3ff; }

.cat-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: clamp(18px, 4vw, 30px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--gold-line);
  background:
    radial-gradient(420px 220px at 92% -20%, rgba(124, 58, 237, 0.2), transparent 70%),
    linear-gradient(140deg, rgba(18, 28, 52, 0.96), rgba(6, 11, 22, 0.98));
  box-shadow: var(--shadow-lg);
}
.cat-hero-media { position: relative; width: 74px; height: 74px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 19px; overflow: hidden; border: 1px solid var(--gold-line-strong); background: linear-gradient(140deg, rgba(91, 140, 255, 0.24), rgba(255, 255, 255, 0.03)); font-size: 32px; }
.cat-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.cat-hero-media .cat-icon-badge { display: none; }
.cat-hero > div { min-width: 0; }
.cat-hero h1 { margin: 2px 0 0; font-size: clamp(22px, 6vw, 36px); }
.cat-hero p { margin: 8px 0 0; max-width: 620px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.cat-hero .ff-chip { flex: 0 0 auto; margin-left: auto; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr)); gap: 14px; margin-top: 18px; }

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-line);
  background: linear-gradient(180deg, rgba(16, 25, 44, 0.94), rgba(7, 13, 25, 0.98));
  box-shadow: var(--shadow-md);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.24s, box-shadow 0.24s;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--gold-line-strong); box-shadow: 0 22px 52px rgba(2, 6, 18, 0.55); }

.product-media {
  position: relative;
  height: clamp(128px, 38vw, 156px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(320px 150px at 50% 120%, rgba(91, 140, 255, 0.25), transparent 72%),
    linear-gradient(135deg, #16233f, #090f1d);
  border-bottom: 1px solid var(--gold-line);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.product-card:hover .product-media img { transform: scale(1.04); }
.product-media-fallback { font-size: clamp(34px, 10vw, 44px); line-height: 1; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.5)); }

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.8);
  border: 1px solid var(--gold-line-strong);
  color: #cfe0ff;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.product-body { display: flex; flex-direction: column; gap: 7px; padding: 15px 16px 15px; flex: 1 1 auto; min-width: 0; }
.product-cat { font-size: 8.5px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; color: #7ea4ff; }
.product-name { margin: 0; font-family: var(--font-display); font-size: 15.5px; font-weight: 700; }
.product-desc { margin: 0; font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.product-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(150, 180, 240, 0.09); }
.product-price { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: #dbe7ff; }
.product-old { margin-left: 6px; font-size: 10.5px; color: var(--muted-2); text-decoration: line-through; }
.product-buy { min-height: 36px; padding: 8px 16px; flex: 0 0 auto; }

.ff-empty {
  padding: 38px 20px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--gold-line-strong);
  background: rgba(140, 175, 255, 0.03);
}
.ff-empty-icon { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 14px; border: 1px solid var(--gold-line); background: var(--gold-soft); font-size: 22px; }
.ff-empty strong { display: block; font-family: var(--font-display); font-size: 15px; }
.ff-empty p { margin: 6px auto 0; max-width: 360px; font-size: 12px; line-height: 1.6; color: var(--muted); }

/* ────────────────────────────  modal / buy  ───────────────────────── */
.ff-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  background: rgba(2, 5, 12, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: ffFade 0.2s ease both;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@keyframes ffFade { from { opacity: 0; } to { opacity: 1; } }

.ff-modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 28px);
  width: min(520px, 100%);
  margin: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-line-strong);
  background: linear-gradient(180deg, #101a2e 0%, #070d19 100%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: ffRise 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes ffRise { from { opacity: 0; transform: translateY(12px) scale(0.99); } to { opacity: 1; transform: none; } }

.ff-modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 0; }
.ff-modal-head > div { min-width: 0; }
.ff-modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 19px; }
.ff-modal-head p { margin: 5px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.ff-modal-close {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 9px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: background 0.18s, color 0.18s;
}
.ff-modal-close:hover { background: rgba(140, 175, 255, 0.1); color: var(--text); }

.ff-modal-body { display: flex; flex-direction: column; gap: 13px; padding: 18px 20px 20px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(140, 175, 255, 0.28) transparent; }
.ff-modal-body::-webkit-scrollbar { width: 8px; }
.ff-modal-body::-webkit-scrollbar-track { background: transparent; }
.ff-modal-body::-webkit-scrollbar-thumb { background: rgba(140, 175, 255, 0.26); border-radius: 999px; }

.ff-order-line { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 13px; border: 1px solid var(--gold-line); background: var(--panel-soft); min-width: 0; }
.ff-order-thumb { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--gold-line); background: linear-gradient(140deg, rgba(91, 140, 255, 0.2), rgba(255, 255, 255, 0.02)); font-size: 22px; }
.ff-order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ff-order-line > div { min-width: 0; }
.ff-order-line strong { display: block; font-family: var(--font-display); font-size: 13.5px; }
.ff-order-line span { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.ff-order-price { margin-left: auto; font-family: var(--font-display); font-size: 16px; font-weight: 700; color: #dbe7ff; white-space: nowrap; }

.ff-step { display: flex; align-items: center; gap: 8px; font-size: 9px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); }
.ff-step b { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--gold-soft); border: 1px solid var(--gold-line-strong); color: #a9c3ff; font-size: 9px; }

.ff-field { display: grid; gap: 6px; min-width: 0; }
.ff-field > span { font-size: 9.5px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }
.ff-field > span em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--muted-2); font-weight: 600; }
.ff-field small { font-size: 10.5px; line-height: 1.5; color: var(--muted-2); }

.ff-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(4, 8, 16, 0.5);
  color: var(--text);
  /* 16px keeps iOS from zooming the page on focus */
  font-size: 16px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
@media (min-width: 720px) { .ff-input { font-size: 13.5px; } }
.ff-input::placeholder { color: #5f6f8d; }
.ff-input:focus { outline: none; border-color: var(--gold-line-strong); box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.14); background: rgba(4, 8, 16, 0.66); }
textarea.ff-input { min-height: 84px; resize: vertical; }
.ff-input[readonly], .ff-input:disabled { color: var(--muted); background: rgba(255, 255, 255, 0.02); }

.ff-readonly {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px dashed var(--gold-line);
  background: rgba(91, 140, 255, 0.07);
  font-size: 12.5px;
  color: #cfe0ff;
  min-width: 0;
}
.ff-readonly > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-readonly svg { flex: 0 0 auto; opacity: 0.8; }
.ff-readonly small { margin-left: auto; flex: 0 0 auto; font-size: 8.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }

.ff-discord-box { padding: 12px; border-radius: 13px; border: 1px solid rgba(88, 101, 242, 0.34); background: rgba(88, 101, 242, 0.1); }
.ff-discord-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ff-discord-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: rgba(88, 101, 242, 0.24); color: #c7ccff; }
.ff-discord-top > div { min-width: 0; }
.ff-discord-top strong { display: block; font-size: 12px; }
.ff-discord-top span { display: block; font-size: 10.5px; color: var(--muted); }
.ff-discord-top a { margin-left: auto; flex: 0 0 auto; }
.ff-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.ff-check input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: #5b8cff; }

.ff-modal-foot { display: flex; align-items: center; gap: 9px; padding: 0 20px 20px; flex-wrap: wrap; }
.ff-modal-foot .ff-btn-gold { flex: 1 1 auto; }

.ff-note { display: flex; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: rgba(140, 175, 255, 0.04); font-size: 10.5px; line-height: 1.6; color: var(--muted-2); }

.ff-alert { display: flex; gap: 8px; padding: 10px 12px; border-radius: 10px; font-size: 11px; line-height: 1.55; border: 1px solid var(--gold-line); background: var(--gold-soft); color: #c3d6ff; }
.ff-alert.warn { border-color: rgba(251, 191, 36, 0.34); background: rgba(251, 191, 36, 0.09); color: #ffe2a3; }
.ff-alert.ok { border-color: rgba(52, 211, 153, 0.32); background: rgba(52, 211, 153, 0.09); color: #b5f5d8; }
.ff-alert.bad { border-color: rgba(251, 113, 133, 0.34); background: rgba(251, 113, 133, 0.09); color: #ffc2cc; }

/* success panel after checkout */
.ff-done { display: grid; gap: 12px; text-align: center; padding: 6px 0 2px; }
.ff-done-mark { width: 56px; height: 56px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.12); color: #8ff0c8; font-size: 24px; }
.ff-done h3 { margin: 0; font-family: var(--font-display); font-size: 19px; }
.ff-done p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.ff-done-no { display: inline-flex; align-items: center; gap: 8px; justify-self: center; padding: 7px 13px; border-radius: 999px; border: 1px dashed var(--gold-line-strong); background: rgba(91, 140, 255, 0.08); font-family: var(--font-display); font-size: 13px; font-weight: 700; color: #dbe7ff; }
.ff-done-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding: 0 20px 20px; }

/* ─────────────────────────────  toast  ────────────────────────────── */
.ff-toasts { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.ff-toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: min(360px, 100%);
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--gold-line-strong);
  background: rgba(9, 15, 28, 0.97);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  animation: ffToastIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: opacity 0.22s, transform 0.22s;
}
.ff-toast.success { border-color: rgba(52, 211, 153, 0.42); }
.ff-toast.error { border-color: rgba(251, 113, 133, 0.45); }
.ff-toast.warning { border-color: rgba(251, 191, 36, 0.45); }
@keyframes ffToastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ff-toast-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 5px;
  background: rgba(91, 140, 255, 0.16);
  color: #b7cdff;
  font-size: 10px;
  font-weight: 800;
}
.ff-toast.success .ff-toast-icon { background: rgba(52, 211, 153, 0.16); color: #8ff0c8; }
.ff-toast.error .ff-toast-icon { background: rgba(251, 113, 133, 0.16); color: #ffc2cc; }

/* ────────────────────────────  account  ───────────────────────────── */
.acct-wrap { padding-top: 24px; padding-bottom: 56px; }
.acct-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; align-items: start; }

.acct-id { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 20px; }
.acct-avatar { position: relative; width: 84px; height: 84px; border-radius: 24px; overflow: hidden; border: 1px solid var(--gold-line-strong); background: linear-gradient(140deg, rgba(91, 140, 255, 0.3), rgba(124, 58, 237, 0.16)); display: grid; place-items: center; font-family: var(--font-display); font-size: 28px; font-weight: 700; color: #dbe7ff; box-shadow: 0 16px 36px rgba(2, 6, 18, 0.45); }
.acct-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acct-id h1 { margin: 14px 0 0; font-size: 21px; max-width: 100%; overflow-wrap: anywhere; }
.acct-id p { margin: 4px 0 0; font-size: 12px; color: var(--muted); word-break: break-word; }
.acct-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }

.acct-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; width: 100%; margin-top: 18px; }
.acct-stat { padding: 10px 6px; border-radius: 11px; border: 1px solid var(--border); background: rgba(140, 175, 255, 0.04); min-width: 0; }
.acct-stat span { display: block; font-size: 8px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.acct-stat strong { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 17px; }

.acct-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 16px; }

.acct-form { display: grid; gap: 13px; }
.acct-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acct-avatar-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.acct-order { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(140, 175, 255, 0.035); min-width: 0; }
.acct-order:hover { border-color: var(--gold-line-strong); background: rgba(140, 175, 255, 0.07); }
.acct-order > .order-main { min-width: 0; flex: 1 1 auto; }
.acct-order strong { display: block; font-size: 12.5px; }
.acct-order span { display: block; margin-top: 2px; font-size: 10px; color: var(--muted-2); }
.acct-order-price { flex: 0 0 auto; font-family: var(--font-display); font-weight: 700; color: #dbe7ff; white-space: nowrap; }
.acct-order-tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.order-thumb { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--gold-line); background: var(--panel-soft); font-size: 17px; overflow: hidden; }
.order-thumb img { width: 100%; height: 100%; object-fit: cover; }

.ff-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-size: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.ff-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ff-status.pending { color: #ffe1a3; border-color: rgba(251, 191, 36, 0.34); background: rgba(251, 191, 36, 0.09); }
.ff-status.processing { color: #a9c3ff; border-color: rgba(91, 140, 255, 0.36); background: rgba(91, 140, 255, 0.1); }
.ff-status.completed { color: #8ff0c8; border-color: rgba(52, 211, 153, 0.34); background: rgba(52, 211, 153, 0.09); }
.ff-status.rejected { color: #ffc2cc; border-color: rgba(251, 113, 133, 0.34); background: rgba(251, 113, 133, 0.09); }

/* username availability hint */
.ff-hint-line { display: flex; align-items: center; gap: 6px; min-height: 14px; font-size: 10.5px; line-height: 1.4; color: var(--muted-2); }
.ff-hint-line.ok { color: #8ff0c8; }
.ff-hint-line.bad { color: #ffc2cc; }
.ff-hint-line.busy { color: var(--muted); }

/* ─────────────────────────────  footer  ───────────────────────────── */
.ff-footer { position: relative; z-index: 2; margin-top: 40px; border-top: 1px solid var(--gold-line); padding: 22px 0 max(26px, env(safe-area-inset-bottom)); }
.ff-footer-inner { width: min(1160px, 100%); margin: 0 auto; padding: 0 20px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; font-size: 11px; line-height: 1.6; color: var(--muted-2); }
.ff-footer a:hover { color: #a9c3ff; }

/* ═══════════════════════════════════════════════════════════════════
   index.html unification — same palette & type as the store/admin
   ═══════════════════════════════════════════════════════════════════ */
body {
  font-family: var(--font-body);
  background-color: var(--ink);
}

body:not(.ff-app) {
  background-image:
    radial-gradient(900px 500px at 10% -10%, rgba(79, 124, 255, 0.16), transparent 62%),
    radial-gradient(820px 480px at 92% 0%, rgba(124, 58, 237, 0.12), transparent 60%);
}

.hero-title,
.section-title,
.connection-title,
.server-info-title,
.auth-header h1,
.profile-head h1,
.brand-name {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

.hero-title {
  background: linear-gradient(120deg, #ffffff 8%, #cfe0ff 55%, #7c9cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header { border-bottom-color: var(--gold-line); }
.site-header.scrolled { background: rgba(5, 9, 18, 0.9); border-bottom-color: var(--gold-line-strong); }

.logo-mark {
  border: 1px solid var(--gold-line-strong);
  background: linear-gradient(150deg, rgba(91, 140, 255, 0.26), rgba(255, 255, 255, 0.02));
  color: #cfe0ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 20px rgba(2, 6, 18, 0.4);
}

.btn-primary {
  border: 1px solid transparent;
  background: linear-gradient(135deg, #5b8cff, #4f5be8);
  color: #fff;
  box-shadow: 0 10px 26px rgba(59, 95, 220, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.btn-primary:hover { background: linear-gradient(135deg, #6f9bff, #5661f0); }

.panel {
  border-color: var(--gold-line);
  background: linear-gradient(180deg, rgba(16, 25, 44, 0.9), rgba(8, 14, 27, 0.94));
  box-shadow: 0 20px 50px rgba(2, 6, 18, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.status-pill.online { color: #8ff0c8; border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.08); }
.store-cat.active { color: #dbe7ff; border-color: var(--gold-line-strong); background: var(--gold-soft); }
.store-buy { background: linear-gradient(135deg, #5b8cff, #4f5be8); color: #fff; }
.hero-domain { border-color: var(--gold-line-strong); color: #cfe0ff; background: var(--gold-soft); }

/* index store → category cards (JS renders these) */
.home-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 11px; }
.home-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  text-align: left;
  border-radius: 16px;
  border: 1px solid var(--gold-line);
  background: linear-gradient(180deg, rgba(16, 25, 44, 0.94), rgba(7, 13, 25, 0.98));
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s;
}
.home-cat:hover { transform: translateY(-2px); border-color: var(--gold-line-strong); }
.home-cat-media { position: relative; height: 96px; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--gold-line); background: radial-gradient(280px 130px at 50% 130%, rgba(91, 140, 255, 0.26), transparent 72%), linear-gradient(135deg, #16233f, #090f1d); font-size: 30px; }
.home-cat-media img { width: 100%; height: 100%; object-fit: cover; }
.home-cat-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-cat-body strong { font-family: var(--font-display); font-size: 13.5px; }
.home-cat-body span { font-size: 10.5px; line-height: 1.5; color: var(--muted); }
.home-cat-go { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #7ea4ff; }

/* index login profile popup */
#profileSetup .ff-modal-card { max-width: 470px; }
.pfp-setup-head { display: flex; align-items: center; gap: 12px; padding: 20px 20px 0; }
.pfp-setup-avatar { width: 50px; height: 50px; flex: 0 0 auto; border-radius: 15px; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--gold-line-strong); background: linear-gradient(140deg, rgba(91, 140, 255, 0.26), rgba(124, 58, 237, 0.16)); color: #dbe7ff; font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.pfp-setup-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pfp-setup-head h2 { margin: 0; font-family: var(--font-display); font-size: 18px; }
.pfp-setup-head p { margin: 4px 0 0; font-size: 11px; color: var(--muted); }

/* index store header link */
.store-all-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--gold-line);
  background: var(--gold-soft);
  color: #cfe0ff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.store-all-link:hover { transform: translateY(-1px); border-color: var(--gold-line-strong); background: rgba(91, 140, 255, 0.2); }

/* ─────────────────  access / permissions (admin panel)  ──────────── */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 8px; }
.perm-item { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--border); background: rgba(140, 175, 255, 0.035); font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.perm-item input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: #5b8cff; }
.perm-item strong { display: block; font-size: 11.5px; color: var(--text); font-weight: 700; }
.perm-item span { display: block; margin-top: 2px; font-size: 10px; color: var(--muted-2); }
.perm-item.locked { opacity: 0.5; }

/* ─────────────────────────────  responsive  ──────────────────────── */
@media (max-width: 980px) {
  .acct-grid { grid-template-columns: 1fr; }
  .ff-nav { display: none; }
  .cat-hero { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cat-hero .ff-chip { margin-left: 0; }
}

@media (max-width: 620px) {
  .ff-shell { padding: 0 14px; }
  .ff-header-inner { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); gap: 9px; }
  .ff-brand-text small { display: none; }
  .ff-head-actions .ff-btn-gold { display: none; }
  .ff-account { max-width: 42vw; padding-right: 9px; }
  .ff-account > span:last-child { display: none; }
  .ff-account { padding: 4px; gap: 0; }
  .shop-hero { margin-top: 16px; padding: 20px 18px; border-radius: 20px; }
  .shop-hero::after { display: none; }
  .ff-card { padding: 17px; border-radius: 17px; }
  .ff-modal { padding: 0; align-items: flex-end; }
  .ff-modal-card { display: flex; flex-direction: column; border-radius: 20px 20px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); max-height: calc(100dvh - 8px); margin: 0; width: 100%; }
  .ff-modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .ff-modal-head, .ff-modal-foot { flex: 0 0 auto; }
  .ff-done-actions { padding: 0 16px 18px; }
  .ff-modal-head { padding: 18px 16px 0; }
  .ff-modal-body { padding: 15px 16px 16px; gap: 12px; }
  .ff-modal-foot { padding: 0 16px 18px; }
  .ff-modal-foot .ff-btn { flex: 1 1 130px; }
  .acct-form-row { grid-template-columns: 1fr; }
  .acct-order { flex-wrap: wrap; }
  .acct-order-tools { width: 100%; justify-content: space-between; }
  .acct-order-price { margin-left: 0; }
  .acct-order-tools { margin-left: auto; }
  .product-foot .ff-btn { flex: 1 1 100%; }
  .ff-toast { font-size: 11.5px; }
}

@media (max-width: 400px) {
  .shop-meta-item { min-width: 62px; }
  .acct-stat strong { font-size: 15px; }
  .ff-chip { font-size: 8.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
