/* agentsys, agents space (agentsys.winam.app). Mobile first, 360 px and up, one centred
   column. Winam charter (docs/charte, design/LoginScreen and WalletCard). No inline style,
   no script (CSP). Budget: under 12 KB. */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --bg: #11151b;
  --surface: #23272f;
  --text: #f5f7fa;
  --text-2: rgba(245, 247, 250, 0.6);
  --text-3: rgba(245, 247, 250, 0.45);
  --border: rgba(255, 255, 255, 0.07);
  --green: #00c853;
  --green-soft: rgba(0, 200, 83, 0.12);
  --gold: #ffc107;
  --gold-soft: rgba(255, 193, 7, 0.1);
  --gold-line: rgba(255, 193, 7, 0.25);
  --red: #ff6b6b;
  --ink: #11151b;
  --ink-2: rgba(17, 21, 27, 0.7);
  --font: Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

p, h1, h2, ul { margin: 0; }

a { color: var(--green); }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.col {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --- Brand ------------------------------------------------------------------------------ */

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 0 6px;
}

.brand-mark { width: 64px; height: 64px; border-radius: 16px; }

.wordmark {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}

.slogan { font-size: 15px; font-weight: 700; }

.g { color: var(--green); }

.dim { color: rgba(245, 247, 250, 0.3); }

/* --- Card, titles ----------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.title { font-size: 24px; font-weight: 700; line-height: 1.25; }

.intro { font-size: 14px; font-weight: 600; color: var(--text-2); }

.footnote {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  text-align: center;
}

.strong { font-size: 15px; font-weight: 700; }

/* --- Forms ------------------------------------------------------------------------------ */

.form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.hint { font-size: 14px; font-weight: 600; color: var(--text-3); }

.field-error { font-size: 14px; font-weight: 700; color: var(--red); }

.phone, .input {
  height: 56px;
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: 700 18px/1 var(--font);
}

.phone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.phone:focus-within, .input:focus { border-color: var(--green); outline: none; }

.prefix { font-size: 18px; font-weight: 700; color: var(--text-3); }

.bare {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font: inherit;
}

.input { padding: 0 14px; }

.code { font-size: 24px; letter-spacing: 0.4em; text-align: center; }

.is-error { border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 80, 80, 0.06); }

::placeholder { color: rgba(245, 247, 250, 0.3); }

/* --- Buttons ---------------------------------------------------------------------------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  font: 700 18px/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { height: 56px; background: var(--green); color: var(--ink); }

.btn-primary:active { background: #00b34a; }

.btn-secondary { height: 56px; background: var(--bg); color: var(--text); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-small { width: auto; padding: 0 4px; }

.link-quiet {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: rgba(245, 247, 250, 0.7);
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 3px;
}

/* --- Notices ---------------------------------------------------------------------------- */

.notice {
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(245, 247, 250, 0.85);
}

.notice-gold { background: var(--gold-soft); border: 1px solid var(--gold-line); }

.notice-gold .notice-title, .col > .notice-gold p:first-child { color: var(--gold); }

.notice-muted {
  background: rgba(245, 247, 250, 0.05);
  border: 1px solid rgba(245, 247, 250, 0.12);
}

.notice-title { font-size: 15px; font-weight: 700; }

/* « Code oublié ? » opens in place, without script. */
.forgot {
  display: none;
  background: var(--bg);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(245, 247, 250, 0.75);
}

.forgot:target { display: block; }

.forgot:target + .forgot-link { display: none; }

.forgot-title { font-size: 15px; font-weight: 700; color: var(--text); }

/* --- Choice of the code ----------------------------------------------------------------- */

.done-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 14px;
  background: var(--bg);
  border-radius: 12px;
}

.done-text { display: flex; flex-direction: column; }

.tick {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-soft);
  position: relative;
}

.tick::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid var(--green);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* --- Home: top bar and account cards ---------------------------------------------------- */

.topbar { display: flex; align-items: center; gap: 10px; }

.topbar-mark { width: 32px; height: 32px; border-radius: 8px; }

.topbar-phone { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--text-2); }

.cards { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }

.wallet {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wallet-green { background: var(--green); color: var(--ink); }

.wallet-green::before, .wallet-green::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(17, 21, 27, 0.1);
  pointer-events: none;
}

.wallet-green::before { top: -30px; right: -30px; width: 110px; height: 110px; }

.wallet-green::after { bottom: -20px; right: 20px; width: 75px; height: 75px; opacity: 0.7; }

.wallet-dark { background: var(--surface); border: 1px solid var(--border); }

.wallet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.wallet-name { font-size: 18px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }

.wallet-label, .wallet-read { font-size: 14px; font-weight: 700; color: var(--ink-2); }

.wallet-balance { font-size: 36px; font-weight: 700; line-height: 1.1; letter-spacing: -0.5px; }

.wallet-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(17, 21, 27, 0.14);
  font-size: 14px;
  font-weight: 700;
}

.wallet-dark .wallet-label, .wallet-dark .wallet-read { color: var(--text-3); }

.wallet-dark .wallet-balance { font-size: 24px; color: var(--text-2); }

.wallet-dark .wallet-foot { border-top-color: var(--border); color: var(--text-3); }

.wallet .notice { margin-top: 12px; }

.wallet-green .notice { background: rgba(17, 21, 27, 0.1); border: 0; color: var(--ink); }

.badge {
  flex: none;
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
}

.wallet-green .badge { background: var(--ink); color: var(--green); }

.wallet-green .badge-low { color: var(--gold); }

.wallet-green .badge-now { background: var(--gold); color: var(--ink); }

.badge-pending, .badge-muted {
  background: rgba(245, 247, 250, 0.05);
  border: 1px solid rgba(245, 247, 250, 0.1);
  color: var(--text-2);
}

/* --- Tabs Recharger / Mon réseau, for the persons who manage a network (lot 4c) ---------- */

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: 12px; }

.tab {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.tab-on { background: var(--green); color: var(--ink); }
