/* site.css - grey and white with blue (main) and orange (accent) */
:root {
  --bg: #eef1f5;          /* page background: light grey */
  --panel: #ffffff;       /* cards and forms: white */
  --ink: #18202c;         /* main text */
  --muted: #667085;       /* small grey text */
  --line: #dde2ea;        /* borders */
  --blue: #1f5fbf;        /* buttons, links */
  --blue-dark: #174a96;   /* button when pressed */
  --blue-soft: #e8f0fc;   /* light blue backgrounds */
  --orange: #f08a24;      /* the accent */
  --orange-soft: #fff1e3;
  --bad: #c0362c;
  --good: #1d7a46;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* anything marked hidden really disappears, on every page */
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  display: flex; flex-direction: column;
}
a { color: var(--blue); }

/* ---------- loading bar at the very top (shown while a page loads) ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 50; pointer-events: none; }
.progress::before {
  content: ""; display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--blue), var(--orange));
}
.progress.on::before { animation: progress 2.2s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes progress { from { width: 0; } to { width: 90%; } }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(16px, 4vw, 32px);
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand .mark {
  width: 30px; height: 20px; border-radius: 4px; position: relative;
  background: linear-gradient(135deg, var(--blue) 60%, var(--orange) 60%);
}
.brand .tag {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--orange); background: var(--orange-soft); border-radius: 999px; padding: 2px 8px;
}
.top nav { display: flex; align-items: center; gap: 8px; }
.top nav form { margin: 0; }
.nav-link {
  color: var(--ink); text-decoration: none; font: inherit; font-size: 15px;
  background: none; border: 0; border-radius: 8px; padding: 7px 12px; cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--bg); }
.nav-link.primary { background: var(--blue); color: #fff; }
.nav-link.primary:hover { background: var(--blue-dark); }
.who { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 13px;
}

/* ---------- the thin top strip: Home and Telegram ---------- */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.strip-top { background: #14233b; color: #dbe6f6; font-size: 13px; }
.strip-in { max-width: 1440px; margin: 0 auto; padding: 6px clamp(16px, 4vw, 32px); display: flex; justify-content: flex-end; gap: 18px; }
.strip-in a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; opacity: .9; }
.strip-in a:hover { opacity: 1; color: #fff; }
.strip-in .ico { width: 15px; height: 15px; }
.strip-in a:last-child { color: #ffc483; }

/* ---------- menu button and drawer ---------- */
.nav-balance { font-size: 14px; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 4px 10px; }
.menu-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s; }
.menu-btn:hover { background: var(--bg); border-color: #c7cfdb; }
.menu-btn .ico { width: 22px; height: 22px; }
.menu-dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; }
.drawer-back { position: fixed; inset: 0; z-index: 70; background: rgba(16, 24, 40, .3); backdrop-filter: blur(3px); animation: fadein .2s ease both; }
.drawer {
  position: fixed; z-index: 71; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: -18px 0 40px rgba(16, 24, 40, .12);
  transform: translateX(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.avatar.big { width: 44px; height: 44px; font-size: 18px; }
.drawer-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.drawer-who span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--bg); }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.drawer-nav a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; transition: background .15s; }
.drawer-nav a:hover { background: var(--bg); }
.drawer-nav a[aria-current] { background: var(--blue-soft); color: var(--blue); }
.drawer-nav .ico { width: 20px; height: 20px; color: var(--blue); }
.nav-badge { margin-left: auto; font-size: 12px; font-weight: 600; color: #b8600c; background: var(--orange-soft); border-radius: 999px; padding: 2px 8px; }
.nav-amount { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.drawer-out { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); }
.drawer-out button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; font: inherit; font-weight: 500; color: var(--bad); background: none; border: 0; border-radius: 10px; cursor: pointer; }
.drawer-out button:hover { background: #fdf0ef; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- page ---------- */
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: clamp(20px, 5vw, 48px) clamp(16px, 4vw, 32px); }
.enter { animation: enter .45s ease-out both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.note {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 10px; margin: 0 0 18px; font-size: 15px;
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--blue);
  animation: enter .35s ease-out both;
}
.note.success { border-left-color: var(--good); }
.note.error { border-left-color: var(--bad); color: var(--bad); }
.note.info { border-left-color: var(--orange); }

/* ---------- login / register: a split box ---------- */
.auth {
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
  max-width: 920px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.auth-side {
  position: relative; padding: 40px; color: #fff; overflow: hidden;
  background: linear-gradient(150deg, #1f5fbf 0%, #174a96 70%);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.auth-side::after {                                  /* a soft orange glow in the corner */
  content: ""; position: absolute; width: 320px; height: 320px; right: -120px; bottom: -140px;
  background: radial-gradient(circle, rgba(240, 138, 36, .55), transparent 65%);
}
.auth-side h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.25; }
.auth-side p { margin: 0; color: rgba(255, 255, 255, .8); }

/* the little card picture on the blue side, floating */
.mini-card {
  position: relative; z-index: 1; width: min(300px, 100%); aspect-ratio: 85.6 / 54;
  border-radius: 14px; background: #fff; color: var(--ink); padding: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25); animation: float 6s ease-in-out infinite;
  display: grid; grid-template-columns: 34% 1fr; grid-template-rows: auto 1fr; gap: 10px 12px;
}
.mini-card .band { grid-column: 1 / -1; height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--orange)); }
.mini-card .face { border-radius: 8px; background: linear-gradient(180deg, #dbe6f6, #b9cdec); position: relative; overflow: hidden; }
.mini-card .face::before { content: ""; position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; left: 27%; top: 18%; background: #8fb0e0; }
.mini-card .face::after { content: ""; position: absolute; width: 80%; height: 40%; border-radius: 50% 50% 0 0; left: 10%; bottom: -6%; background: #8fb0e0; }
.mini-card .lines { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.mini-card .lines i { display: block; height: 8px; border-radius: 4px; background: var(--line); }
.mini-card .lines i:nth-child(1) { width: 80%; background: #c9d3e1; }
.mini-card .lines i:nth-child(2) { width: 60%; }
.mini-card .lines i:nth-child(3) { width: 70%; }
.mini-card .lines i:nth-child(4) { width: 40%; background: var(--orange-soft); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(-1deg); } }

.auth-form { padding: 40px; }
.auth-form h1 { margin: 0 0 4px; font-size: 24px; }
.auth-form .lead { margin: 0 0 24px; color: var(--muted); }

/* ---------- form boxes ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--ink);
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:hover { border-color: #c7cfdb; }
.field input:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 95, 191, .12); }
.field.has-error input { border-color: var(--bad); }
.field small { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.field em { display: block; color: var(--bad); font-style: normal; font-size: 13px; margin-top: 6px; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font: inherit; font-size: 13px; font-weight: 600; color: var(--blue);
  background: none; border: 0; border-radius: 6px; padding: 6px 8px; cursor: pointer;
}
.pw button:hover { background: var(--blue-soft); }

/* ---------- buttons, with a spinner while sending ---------- */
.btn {
  position: relative; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 16px; margin-top: 6px; font: inherit; font-weight: 600; color: #fff;
  background: var(--blue); border: 0; border-radius: 10px; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: var(--blue-dark); box-shadow: 0 6px 16px rgba(31, 95, 191, .25); }
.btn:active { transform: scale(.99); }
.btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.btn .spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.loading { pointer-events: none; opacity: .9; }
.btn.loading .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.alt { text-align: center; color: var(--muted); font-size: 14px; margin: 20px 0 0; }
.alt a { font-weight: 600; text-decoration: none; }
.alt a:hover { text-decoration: underline; }

/* ---------- home ---------- */
.hello {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: clamp(22px, 4vw, 36px); border-radius: 18px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1f5fbf, #174a96);
}
.hello::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -120px; background: radial-gradient(circle, rgba(240, 138, 36, .5), transparent 65%); }
.hello h1 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 28px); }
.hello p { margin: 0; color: rgba(255, 255, 255, .8); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); animation: enter .45s ease-out both;
}
.tile:nth-child(2) { animation-delay: .06s; }
.tile:nth-child(3) { animation-delay: .12s; }
.tile h3 { margin: 0 0 4px; font-size: 16px; }
.tile p { margin: 0; color: var(--muted); font-size: 14px; }
.tile .num { font-size: 28px; font-weight: 700; color: var(--blue); }
.tile.soon { border-style: dashed; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; color: var(--orange); background: var(--orange-soft); border-radius: 999px; padding: 2px 8px; margin-bottom: 8px; }

/* skeleton shimmer: grey blocks shown while something loads */
.skeleton { border-radius: 8px; background: linear-gradient(90deg, #e6eaf0 25%, #f3f5f8 37%, #e6eaf0 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.agree { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.agree a { font-weight: 600; }

/* ---------- footer ---------- */
.site-foot { margin-top: 40px; background: var(--panel); border-top: 1px solid var(--line); }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 32px) 20px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-about p { margin: 12px 0 0; color: var(--muted); font-size: 14px; max-width: 380px; }
.foot-small { font-size: 13px !important; }
.foot-col h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.foot-col a { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--ink); text-decoration: none; font-size: 15px; }
.foot-col a:hover { color: var(--blue); }
.soon-dot { font-size: 11px; font-weight: 600; color: var(--orange); background: var(--orange-soft); border-radius: 999px; padding: 0 7px; }
.foot-base { margin: 0; padding: 14px; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- legal pages ---------- */
.doc { max-width: 760px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.doc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.doc-tabs a { padding: 6px 12px; border-radius: 999px; font-size: 14px; text-decoration: none; color: var(--muted); background: var(--bg); }
.doc-tabs a[aria-current] { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.doc h1 { font-size: 28px; margin: 0 0 4px; }
.doc h2 { font-size: 18px; margin: 26px 0 8px; }
.doc p, .doc li { color: #344054; }
.doc ul { padding-left: 20px; }
.doc li { margin: 4px 0; }
.doc-date { color: var(--muted) !important; font-size: 14px; margin: 0 0 14px; }
.doc-draft { font-size: 14px; padding: 10px 14px; border-radius: 10px; background: var(--orange-soft); color: #8a4a08 !important; }
.doc-warn { font-size: 17px; padding: 14px 16px; border-radius: 12px; border-left: 4px solid var(--orange); background: var(--orange-soft); color: #6b3a06 !important; }
.doc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.doc-ok, .doc-no { border-radius: 12px; padding: 4px 18px 10px; border: 1px solid var(--line); }
.doc-ok { background: #effaf3; }
.doc-no { background: #fdf0ef; }
.doc-ok h2 { color: var(--good); }
.doc-no h2 { color: var(--bad); }

/* ---------- coming soon ---------- */
.soon { max-width: 520px; margin: 40px auto; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 40px 28px; box-shadow: var(--shadow); }
.soon-badge { display: inline-block; font-size: 13px; font-weight: 600; color: var(--orange); background: var(--orange-soft); border-radius: 999px; padding: 4px 12px; }
.soon h1 { margin: 14px 0 6px; }
.soon .muted { color: var(--muted); }
.soon-btn { max-width: 280px; margin-top: 18px; text-decoration: none; }

@media (max-width: 760px) {
  .strip-in { justify-content: space-between; }
  .nav-balance { display: none; }
  .foot-in { grid-template-columns: 1fr 1fr; gap: 24px; }
  .foot-about { grid-column: 1 / -1; }
  .doc-cols { grid-template-columns: 1fr; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; max-width: 480px; }
  .auth-side { padding: 28px; gap: 20px; }
  .auth-side .mini-card { display: none; }      /* keep the phone page short */
  .auth-side h2 { font-size: 21px; }
  .auth-form { padding: 28px; }
}
@media (max-width: 480px) {
  main { padding: 16px; }
  .auth { border-radius: 14px; }
  .auth-side { padding: 22px; }
  .auth-form { padding: 22px; }
  .brand .tag { display: none; }
  .who .name { display: none; }                  /* only the round letter on a phone */
  .nav-link { padding: 7px 10px; }
}

/* people who turn animations off in their system settings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.brand-logo { height: 30px; width: auto; max-width: 140px; object-fit: contain; display: block; }   /* an uploaded logo (Admin -> Site settings) */

/* ---------- the 🌐 language picker in the top strip (Admin -> Site content -> Languages) ---------- */
.lang-pick { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; cursor: pointer; position: relative; }
.lang-pick select { appearance: none; -webkit-appearance: none; font: inherit; font-size: 13px; color: inherit; background: transparent;
                    border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 3px 24px 3px 10px; cursor: pointer; }
.lang-pick::after { content: "▾"; position: absolute; right: 9px; font-size: 10px; pointer-events: none; opacity: .8; }
.lang-pick select:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.lang-pick select option { color: var(--ink); background: #fff; }
/* Google Translate's own bar, pop-ups and highlights are hidden: our picker is the only control */
iframe.skiptranslate, .goog-te-banner-frame, .goog-te-balloon-frame, #goog-gt-tt, .goog-tooltip, .goog-te-spinner-pos,
.VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf, .VIpgJd-yAWNEb-L7lbkb { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight, font[style] { background: none !important; box-shadow: none !important; }
#google_translate_element { display: none !important; }
