﻿:root {
  --bg-1: #050505;
  --bg-2: #0d0b08;
  --bg-3: #1a1308;
  --panel: rgba(38, 30, 18, 0.58);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-main: #f7f3eb;
  --text-soft: #a59a86;
  --text-muted: #7f7566;
  --input-border: rgba(255, 255, 255, 0.11);
  --accent: #f6b232;
  --accent-hover: #ffc24e;
  --danger: #ff7373;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: "Plus Jakarta Sans", "Manrope", "Segoe UI Variable", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(1000px 600px at -5% 0%, rgba(255, 152, 0, 0.12), transparent 55%),
    radial-gradient(900px 500px at 105% 100%, rgba(255, 184, 77, 0.09), transparent 58%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2) 42%, var(--bg-3));
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.4rem;
}

.access-screen,
.auth-screen {
  width: min(100%, 420px);
}

.access-card,
.auth-card {
  width: 100%;
  border-radius: 2rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

.access-card {
  padding: 1.5rem;
}

.access-title {
  margin: 0 0 0.25rem;
  color: var(--text-main);
  font-size: 1.45rem;
  font-weight: 800;
}

.access-subtitle {
  margin: 0 0 1.25rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.auth-card {
  position: relative;
  padding: 2.7rem 2rem 1.95rem;
}

.logout-icon-btn {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.logout-icon-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.22);
}

.logout-icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.brand {
  margin: 0;
  text-align: center;
  font-size: clamp(2.7rem, 5.4vw, 3.2rem);
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: #f8f6f1;
}

.brand-subtitle {
  margin: 0.62rem 0 1.95rem;
  text-align: center;
  color: #766d5f;
  font-size: 0.51rem;
  letter-spacing: 0.16em;
  font-weight: 650;
}

.field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--input-border);
  padding: 0.92rem 1rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field:focus-within {
  border-color: rgba(246, 178, 50, 0.75);
  box-shadow:
    0 0 0 3px rgba(246, 178, 50, 0.14),
    0 8px 26px rgba(246, 178, 50, 0.08);
  background: rgba(255, 255, 255, 0.028);
}

.field input {
  width: 100%;
  margin: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1.06rem;
  font-weight: 560;
  letter-spacing: 0.005em;
}

.field input::placeholder {
  color: #72695d;
  font-weight: 540;
}

.error {
  margin: 0.2rem 0 0.6rem;
  min-height: 1.1rem;
  color: var(--danger);
  font-size: 0.87rem;
}

.eye-btn {
  width: 1.25rem;
  height: 1.25rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: #7a7061;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.eye-btn:hover {
  color: #baa98f;
}

.eye-icon {
  width: 1.08rem;
  height: 1.08rem;
  fill: currentColor;
}

.eye-off {
  display: none;
}

.eye-btn.is-open .eye-open {
  display: none;
}

.eye-btn.is-open .eye-off {
  display: block;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 0.95rem;
  cursor: pointer;
}

.btn--primary {
  margin-top: 0.4rem;
  min-height: 3.5rem;
  padding: 0.98rem 1rem;
  background: var(--accent);
  color: #261707;
  font-size: 1.08rem;
  font-weight: 780;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(246, 178, 50, 0.25);
}

.divider {
  margin: 1.45rem 0 0.9rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem;
}

.divider span {
  display: block;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.divider small {
  color: #5d554a;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: lowercase;
}

.btn--ghost {
  background: transparent;
  color: #8d8476;
  font-size: 1.93rem;
  font-weight: 630;
  padding: 0.45rem 0 0;
}

.btn--ghost:hover {
  color: #bbb09f;
}

.links {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.links a {
  color: #6f6658;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 560;
}

.links a:hover {
  color: #938776;
}

.qr-screen {
  width: min(100%, 420px);
}

.qr-card {
  width: 100%;
  border-radius: 1.25rem;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  position: relative;
  padding: 1.65rem 1.15rem 1.25rem;
}

.qr-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  border: 0;
  background: transparent;
  color: #9f937e;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}

.qr-close:hover {
  color: #d8c8ad;
}

.qr-title {
  margin: 0;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 740;
  color: #f7f3eb;
}

.qr-subtitle {
  margin: 0.55rem auto 1.15rem;
  max-width: 320px;
  text-align: center;
  color: #9e8f79;
  font-size: 0.98rem;
  line-height: 1.32;
}

.qr-frame {
  width: 262px;
  height: 262px;
  margin: 0 auto;
  border-radius: 1rem;
  background: #ffffff;
  border: 10px solid #ffffff;
  position: relative;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.33);
  display: grid;
  place-items: center;
}

#qr-canvas {
  display: block;
  width: 236px;
  height: 236px;
}

.qr-center-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border: 2px solid #1f2024;
  color: #1f2024;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.03em;
  padding: 0.26rem 0.58rem;
}

.qr-expire {
  margin: 0.95rem 0 0.8rem;
  text-align: center;
  font-size: 0.93rem;
  color: #887a67;
}

.qr-actions {
  display: grid;
  gap: 0.55rem;
}

.qr-btn {
  min-height: 44px;
  border-radius: 0.85rem;
  border: 0;
  font-size: 0.99rem;
  font-weight: 760;
  cursor: pointer;
}

.qr-btn--primary {
  background: var(--accent);
  color: #261707;
}

.qr-btn--secondary {
  background: linear-gradient(90deg, #1f2128, #2d3037);
  color: #b0b7c2;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hidden {
  display: none;
}

@media (max-width: 480px) {
  .auth-card {
    border-radius: 1.5rem;
    padding: 2.3rem 1.25rem 1.35rem;
  }

  .access-card {
    border-radius: 1.5rem;
    padding: 1.2rem;
  }

  .brand {
    font-size: 2.2rem;
  }

  .btn--primary {
    font-size: 1rem;
  }

  .btn--ghost {
    font-size: 1.45rem;
  }

  .qr-frame {
    width: 232px;
    height: 232px;
    border-width: 8px;
  }

  #qr-canvas {
    width: 216px;
    height: 216px;
  }

  .qr-title {
    font-size: 1.45rem;
  }

  .qr-subtitle {
    font-size: 0.9rem;
  }
}

.register-screen {
  width: min(100%, 760px);
}

.register-card {
  width: 100%;
  min-height: 430px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(38, 30, 18, 0.74);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  padding: 28px 32px;
}

.register-screen.hidden {
  display: none;
}

.reg-step {
  display: block;
}

.reg-step.hidden {
  display: none;
}

.reg-back {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 0;
  background: transparent;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 1.7rem;
  line-height: 1;
  color: #d8c8ad;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
}

.reg-back:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f0e2cb;
}

.reg-back.hidden {
  display: none !important;
}

.reg-label {
  display: block;
  margin: 12px 0 8px;
  font-size: 2.6rem;
  color: #d7c7ad;
  font-weight: 560;
}

.reg-input {
  width: min(100%, 560px);
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 2rem;
  padding: 0 18px;
  color: #f4eee3;
}

.country-picker {
  position: relative;
  width: min(100%, 560px);
}

.reg-country-input {
  width: 100%;
  padding-right: 50px;
  cursor: pointer;
}

.reg-pass-wrap {
  position: relative;
  width: min(100%, 560px);
}

.reg-pass-wrap .reg-input {
  width: 100%;
  padding-right: 52px;
}

.reg-pass-eye {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
}

.country-open-btn {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #d9c9af;
  cursor: pointer;
  font-size: 1.15rem;
}

.captcha-box {
  margin: 20px 0 8px;
  width: 300px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: #30343a;
  color: #e8e8e8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-size: 1.45rem;
}

.captcha-box input {
  width: 28px;
  height: 28px;
}

.reg-error {
  min-height: 28px;
  margin: 8px 0;
  color: #9f1d1d;
  font-size: 1.35rem;
}

.reg-btn {
  width: min(100%, 500px);
  height: 60px;
  border: 1px solid rgba(34, 26, 12, 0.55);
  border-radius: 14px;
  background: #f6b232;
  color: #211406;
  font-size: 2rem;
  font-weight: 650;
  cursor: pointer;
}

.reg-btn--dark {
  background: rgba(255, 255, 255, 0.16);
  color: #f4eee2;
  border-color: rgba(255, 255, 255, 0.2);
}

.reg-step--center {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.reg-info {
  font-size: 2.05rem;
  color: #e5d7c0;
  text-align: center;
  max-width: 540px;
}

.reg-pending {
  margin-top: 30px;
  font-size: 2.2rem;
  color: #d6c3a5;
}

.reg-success {
  font-size: 2.2rem;
  color: #eadcc5;
  margin-bottom: 22px;
}

.country-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.7);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.country-modal.hidden {
  display: none;
}

.country-modal__panel {
  width: 500px;
  height: 500px;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #1f160f;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.country-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.country-modal__header h3 {
  margin: 0;
  font-size: 1.12rem;
  color: #f2e6d3;
}

.country-modal__header button {
  border: 0;
  background: transparent;
  color: #d9c9af;
  font-size: 1.5rem;
  cursor: pointer;
}

.country-modal__search {
  margin: 12px 16px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #2b2017;
  color: #f4eee3;
  padding: 0 12px;
  font-size: 1rem;
}

.country-modal__list {
  margin: 0;
  padding: 0 8px 8px;
  list-style: none;
  overflow: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #8e6a32 #2a1d12;
}

.country-modal__list::-webkit-scrollbar {
  width: 10px;
}

.country-modal__list::-webkit-scrollbar-track {
  background: #2a1d12;
  border-radius: 10px;
}

.country-modal__list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c48a2f, #8e6a32);
  border-radius: 10px;
  border: 2px solid #2a1d12;
}

.country-modal__list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d39a3f, #9f7438);
}

.country-modal__list button {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e8dcc9;
  font-size: 0.98rem;
  padding: 10px 12px;
  cursor: pointer;
}

.country-modal__list button:hover {
  background: rgba(246, 178, 50, 0.18);
}

.reg-confirm {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.68);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.reg-confirm.hidden {
  display: none;
}

.reg-confirm__panel {
  min-width: 320px;
  max-width: 420px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(38, 30, 18, 0.95);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 20px;
}

.reg-confirm__text {
  margin: 0 0 0.9rem;
  color: #f3e8d7;
  font-size: 1.35rem;
  text-align: center;
}

.reg-confirm__actions {
  display: flex;
  gap: 0.7rem;
}

.reg-confirm__btn {
  min-width: 110px;
  height: 42px;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 650;
}

.reg-confirm__btn--yes {
  background: #f6b232;
  color: #211406;
  border-color: rgba(34, 26, 12, 0.55);
}

.reg-confirm__btn--no {
  background: rgba(255, 255, 255, 0.14);
  color: #f1e5d1;
}

.recovery-screen {
  width: min(100%, 420px);
}

.recovery-card {
  width: 100%;
  border-radius: 1.25rem;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  position: relative;
  padding: 1.55rem 1.15rem 1.25rem;
}

.recovery-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  border: 0;
  background: transparent;
  color: #9f937e;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}

.recovery-close:hover {
  color: #d8c8ad;
}

.recovery-step.hidden {
  display: none;
}

.recovery-title {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 740;
  color: #f7f3eb;
}

.recovery-subtitle {
  margin: 0.5rem 0 0.35rem;
  text-align: center;
  font-size: 2.05rem;
  font-weight: 760;
  color: #f7f3eb;
}

.recovery-caption {
  margin: 0 0 1.1rem;
  text-align: center;
  color: #9e8f79;
  font-size: 1.05rem;
  line-height: 1.32;
}

.recovery-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  margin: 1rem 0 1.25rem;
}

.recovery-line input {
  width: 100%;
  background: transparent;
  border: 0;
  color: #efe8db;
  font-size: 1.15rem;
  text-align: center;
  outline: none;
  padding: 0.62rem 0.2rem;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.recovery-line input::placeholder {
  color: #8f816d;
}

.recovery-line--pass input {
  text-align: left;
  padding-left: 0.2rem;
}

.recovery-line #rec-pass-code {
  letter-spacing: 0.42em;
}

.recovery-submit,
.recovery-action {
  width: 100%;
  min-height: 46px;
  border-radius: 0.85rem;
  border: 0;
  font-size: 1.02rem;
  font-weight: 760;
  cursor: pointer;
}

.recovery-submit {
  margin-top: 0.85rem;
  background: linear-gradient(90deg, #1f2128, #2d3037);
  color: #7d8087;
}

.recovery-submit:not(.disabled) {
  background: var(--accent);
  color: #261707;
}

.recovery-action {
  margin-top: 0.95rem;
  background: var(--accent);
  color: #261707;
}

.recovery-resend {
  margin: 0.95rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #887a67;
}

.recovery-resend:not(.disabled) {
  color: #f6b232;
}

.recovery-username {
  margin: 0.15rem 0 1rem;
  text-align: center;
  color: #f7f3eb;
  font-size: 2.1rem;
  font-weight: 700;
}

.recovery-confirm {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.68);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.recovery-confirm.hidden {
  display: none;
}

.recovery-confirm__panel {
  min-width: 320px;
  max-width: 420px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(38, 30, 18, 0.95);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 20px;
}

.recovery-confirm__text {
  margin: 0 0 0.9rem;
  color: #f3e8d7;
  font-size: 1.2rem;
  text-align: center;
}

.recovery-confirm__actions {
  display: flex;
  gap: 0.7rem;
}

.recovery-confirm__btn {
  min-width: 110px;
  height: 42px;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 650;
}

.recovery-confirm__btn--yes {
  background: var(--accent);
  color: #261707;
  border-color: rgba(34, 26, 12, 0.55);
}

.recovery-confirm__btn--no {
  background: rgba(255, 255, 255, 0.14);
  color: #f1e5d1;
}

@media (max-width: 480px) {
  .recovery-card {
    border-radius: 1rem;
    padding: 1.3rem 0.9rem 1.1rem;
  }

  .recovery-title {
    font-size: 1.45rem;
  }

  .recovery-subtitle {
    font-size: 1.55rem;
  }

  .recovery-caption {
    font-size: 0.93rem;
  }

  .recovery-line input,
  .recovery-submit,
  .recovery-action {
    font-size: 0.98rem;
  }
}
