/* ─── Toffi — design tokens ─────────────────────────────── */
:root {
  --sky: #6db4ee;
  --sky-2: #9fcbf2;
  --sky-3: #cfe6fb;
  --sky-deep: #3d8fd6;
  --grad: linear-gradient(100deg, #6db4ee 0%, #7dbcee 45%, #a3cff3 100%);

  --bg: #08111c;
  --bg-2: #0c1826;
  --surface: #101f31;
  --surface-2: #15283e;
  --line: rgba(159, 203, 242, 0.12);
  --line-strong: rgba(159, 203, 242, 0.26);

  --text: #eaf4fd;
  --text-2: #a9bfd4;
  --text-3: #6f879e;

  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --star: #ffc94d;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--sky-2); text-decoration: none; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--sky); color: #06101b; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-2); }
.tiny { font-size: 12.5px; color: var(--text-3); }
.hidden { display: none !important; }

/* background glow */
.bg-glow { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.bg-glow::before, .bg-glow::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45;
}
.bg-glow::before { width: 620px; height: 620px; background: #2b6fb0; top: -260px; right: -140px; }
.bg-glow::after { width: 520px; height: 520px; background: #1b4a7c; bottom: -260px; left: -180px; opacity: .35; }
.grid-lines {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  opacity: .5;
}

/* ─── buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s, opacity .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #06101b; box-shadow: 0 10px 30px -10px rgba(109, 180, 238, .7); }
.btn-primary:hover:not(:disabled) { color: #06101b; box-shadow: 0 14px 40px -10px rgba(109, 180, 238, .95); transform: translateY(-1px); }
.btn-ghost { background: rgba(159, 203, 242, .06); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: rgba(159, 203, 242, .12); color: #fff; }
.btn-discord { background: #5865f2; color: #fff; box-shadow: 0 12px 34px -12px rgba(88, 101, 242, .9); }
.btn-discord:hover { background: #4752c4; color: #fff; transform: translateY(-1px); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.link-btn { background: none; border: 0; color: var(--sky-2); cursor: pointer; padding: 0; font-weight: 600; font-size: 13.5px; }
.link-btn:hover { color: #fff; }

/* ─── nav ───────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px);
  background: rgba(8, 17, 28, .72);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; gap: 26px; font-size: 14.5px; }
.nav-links a { color: var(--text-2); font-weight: 500; }
.nav-links a:hover { color: #fff; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 5px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03);
  position: relative;
}
.user-chip img { width: 32px; height: 32px; border-radius: 50%; }
.user-chip .u-name { font-size: 14px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip button {
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--text-3); cursor: pointer;
  display: grid; place-items: center;
}
.user-chip button:hover { background: rgba(248, 113, 113, .14); color: var(--danger); }
.user-chip button svg { width: 17px; height: 17px; }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 520px) { .user-chip .u-name { display: none; } .nav .btn-order-nav { padding: 9px 14px; } }

/* ─── cards / sections ──────────────────────────────────── */
.card {
  background: linear-gradient(180deg, rgba(21, 40, 62, .75), rgba(16, 31, 49, .75));
  border: 1px solid var(--line); border-radius: var(--radius);
}
section { padding: 90px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--sky);
}
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--sky); border-radius: 2px; }
.section-head { max-width: 640px; margin-bottom: 42px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 12px 0 12px; letter-spacing: -.02em; }
.section-head p { color: var(--text-2); margin: 0; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ─── footer ────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--text-3); font-size: 13.5px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer img { height: 22px; width: auto; opacity: .85; }

/* ─── stars ─────────────────────────────────────────────── */
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars svg { width: 16px; height: 16px; }
.stars .off { color: rgba(255, 255, 255, .16); }

/* ─── forms ─────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm);
  background: rgba(8, 17, 28, .7); border: 1px solid var(--line-strong); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(109, 180, 238, .16); }
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fcbf2' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.select option { background: var(--bg-2); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(1) hue-rotate(170deg); cursor: pointer; }
.input.invalid, .textarea.invalid { border-color: var(--danger); }

/* ─── toast ─────────────────────────────────────────────── */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(92vw, 440px); }
.toast {
  padding: 14px 18px; border-radius: 14px; background: #13263b; border: 1px solid var(--line-strong);
  box-shadow: var(--shadow); font-size: 14.5px; display: flex; gap: 12px; align-items: flex-start;
  animation: toast-in .25s ease;
}
.toast.error { border-color: rgba(248, 113, 113, .5); }
.toast.error::before { content: '!'; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--danger); color: #1a0a0a; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.toast.success::before { content: '✓'; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #06200f; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ─── reveal animation ──────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(6, 16, 27, .25); border-top-color: #06101b; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ─── admin floating button ─────────────────────────────── */
.admin-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px 12px 14px; border-radius: 999px;
  background: rgba(16,31,49,.92); border: 1px solid rgba(109,180,238,.5); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 14px 40px -12px rgba(0,0,0,.7), 0 0 0 4px rgba(109,180,238,.08); backdrop-filter: blur(10px);
  transition: transform .15s, border-color .15s, background .15s;
}
.admin-fab:hover { color: #fff; transform: translateY(-2px); border-color: var(--sky); background: rgba(21,40,62,.95); }
.admin-fab svg { width: 18px; height: 18px; color: var(--sky); }
@media (max-width: 520px) { .admin-fab span { display: none; } .admin-fab { padding: 12px; } }

/* English date picker */
.date-picker { display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: 8px; }
.date-picker .select { padding-right: 34px; background-position: right 10px center; }
.date-picker.invalid .select { border-color: var(--danger); }
