/*
 * The door. Hebrew, right to left, one dark look.
 *
 * The palette is the iAGI one and is inherited from
 * `nfc-audio/server/public/app.css` rather than re-picked - two consoles that
 * are almost the same colour is worse than either colour on its own.
 *
 * There is no light variant on purpose. What Nir sees here is what he
 * describes to somebody on the phone.
 */

:root {
  --bg: #0D1219;
  --card: #141b23;
  --line: #1e2a33;
  --text: #F5F8F8;
  --dim: #7d8b96;
  --accent: #2DD4BF;
  --accent-deep: #0E7C7B;
  --warn: #E0A340;
  --bad: #E05B5B;
  --radius: 10px;
}

* { box-sizing: border-box; }

/*
 * Beats the `hidden` attribute's own `display: none` in the other direction:
 * any `display` in a rule below would otherwise outrank it and every state of
 * this screen would paint at once. That exact fault cost an hour in the panel
 * and reads as broken routing rather than one line of CSS.
 */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "Segoe UI", "Noto Sans Hebrew", "Arial Hebrew", system-ui,
        -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
  max-width: 420px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand img { height: 34px; width: auto; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}

h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
}

.sub {
  margin: 0 0 22px;
  color: var(--dim);
  font-size: 14px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--dim);
}

input {
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
}

input:focus {
  outline: none;
  border-color: var(--accent-deep);
}

/*
 * The two code fields are read off a screen or off paper and typed back, so
 * they are left-to-right, wide-spaced and monospaced whatever the page
 * direction is. A six-digit code rendered RTL is a support call.
 */
input.code {
  direction: ltr;
  text-align: center;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 20px;
  letter-spacing: 4px;
}

button {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #08131a;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:disabled { opacity: 0.5; cursor: default; }
button.quiet {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
}

.msg {
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.msg.bad { background: rgba(224, 91, 91, 0.12); color: var(--bad); }
.msg.warn { background: rgba(224, 163, 64, 0.12); color: var(--warn); }
.msg.good { background: rgba(45, 212, 191, 0.10); color: var(--accent); }

.qr {
  display: flex;
  justify-content: center;
  margin: 4px 0 18px;
}

.qr svg { border-radius: 8px; }

.secret {
  direction: ltr;
  text-align: center;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  color: var(--dim);
  word-break: break-all;
  margin: 0 0 18px;
}

/*
 * The recovery codes. Shown once, and this is the screen somebody has to be
 * stopped from clicking past - hence the border, the warning colour, and a
 * button that says what leaving costs.
 */
.codes {
  direction: ltr;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--warn);
  border-radius: 8px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
  text-align: center;
}

footer {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  color: var(--dim);
}
