:root {
  --olive: #2d3e33;
  --olive-deep: #24322a;
  --gold: #c19a6b;
  --gold-deep: #a98452;
  --cream: #f6f1e8;
  --muted: #6d746f;
  --white: #fffcf8;
  --line: #e2d8c8;
  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
  --page-max-width: 1120px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: var(--font);
  background: var(--cream);
  color: var(--olive);
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font-family: inherit; }
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 241, 232, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.nav-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo img { height: 48px; width: auto; }
.ghost {
  background: transparent;
  border: 1px solid var(--olive);
  color: var(--olive);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.card {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 0 16px 40px rgba(45, 62, 51, 0.06);
}
.eyebrow {
  color: var(--gold-deep);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
}
h1 {
  font-size: 28px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 8px;
}
.lead { color: var(--muted); margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
  color: var(--olive);
  font-size: 16px;
}
.field input:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input {
  padding-inline-end: 48px;
}
.eye-btn {
  position: absolute;
  inset-inline-end: 6px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--olive);
  cursor: pointer;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}
.eye-btn:focus-visible {
  outline: 2px solid var(--gold);
}
.qr-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 14px;
}
.qr-wrap svg {
  width: min(220px, 100%);
  height: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.setup-key-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.setup-key {
  display: block;
  word-break: break-all;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.or {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 12px;
}
.recovery-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.recovery-list li {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  letter-spacing: 0.06em;
}
.btn-fill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--gold);
  color: var(--olive-deep);
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.btn-fill:disabled { opacity: 0.6; cursor: wait; }
.err {
  display: none;
  background: #f4e4d4;
  color: #8a5a17;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 14px;
}
.err.is-visible { display: block; }
.home {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--gold-deep);
  font-weight: 600;
  font-size: 14px;
}
footer {
  padding: 24px 0 36px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
