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

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

html,
body,
#root {
  min-height: 100%;
  min-height: 100vh;
  background: #0a0e14;
  color: #f4f7fb;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0a0e14;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

/* Kill Android native white inputs / default buttons */
input,
textarea,
select,
button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

button {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  padding: 14px 16px 168px;
  box-sizing: border-box;
}

.font-display {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
}

.glass-card {
  background: #141c28 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -------- Language switch -------- */
.lang-switch {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.lang-switch button {
  min-width: 36px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #8b95a5;
  background: transparent;
}

.lang-switch button.is-active {
  background: #4b8bf5 !important;
  color: #fff !important;
}

/* -------- Login -------- */
.login-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #0a0e14;
}

.login-orb {
  pointer-events: none;
  position: absolute;
  border-radius: 9999px;
  filter: blur(40px);
  opacity: 0.45;
}

.login-orb-a {
  top: -80px;
  left: -60px;
  width: 220px;
  height: 220px;
  background: #4b8bf5;
}

.login-orb-b {
  right: -70px;
  bottom: 10%;
  width: 240px;
  height: 240px;
  background: #7451a6;
}

.login-wrap {
  position: relative;
  z-index: 10;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 20px 20px 28px;
  box-sizing: border-box;
}

.login-lang {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: end;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.login-hero {
  margin-bottom: 28px;
  text-align: center;
}

.login-hero-logo {
  display: inline-block;
  margin-bottom: 14px;
  padding: 18px 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.login-tag {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8b95a5;
}

.login-sub {
  margin: 10px auto 0;
  max-width: 280px;
  font-size: 14px;
  line-height: 1.45;
  color: #a8b2c2;
}

.login-card {
  display: block;
  width: 100%;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141c28 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.login-field {
  display: block !important;
  width: 100% !important;
  margin: 0 0 14px !important;
  float: none !important;
  clear: both !important;
}

.login-field > span {
  display: block !important;
  width: 100% !important;
  margin: 0 0 8px !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8b95a5;
}

.login-field > input,
input.login-input {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  float: none !important;
  margin: 0 !important;
  min-height: 50px !important;
  padding: 14px 16px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: #0a0e14 !important;
  background-color: #0a0e14 !important;
  color: #f4f7fb !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.login-field > input::-webkit-input-placeholder {
  color: #5c6778;
  opacity: 1;
}
.login-field > input::placeholder {
  color: #5c6778;
  opacity: 1;
}

.login-error {
  margin: 0 0 12px;
  color: #ff8a80;
  font-size: 13px;
  font-weight: 600;
}

.login-submit {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 4px 0 0 !important;
  border: 0 !important;
  border-radius: 16px !important;
  padding: 15px 16px !important;
  min-height: 50px;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #fff !important;
  background: #4b8bf5 !important;
  background-image: -webkit-linear-gradient(left, #4b8bf5, #3b6fd9) !important;
  background-image: linear-gradient(90deg, #4b8bf5, #3b6fd9) !important;
  box-shadow: 0 10px 24px rgba(75, 139, 245, 0.35);
}

.login-submit:disabled {
  opacity: 0.55;
}

.login-note {
  margin: 16px 0 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
  color: #6b7585;
}

.login-powered {
  margin-top: 18px;
  text-align: center;
}

.login-powered img {
  height: 18px;
  width: auto;
  opacity: 0.85;
}

/* -------- Home -------- */
.home-top {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 14px;
}

.home-profile {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  padding: 14px;
  margin-bottom: 14px;
  background: #141c28;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
}

.home-avatar {
  width: 56px;
  height: 56px;
  margin-right: 12px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #3b5bdb;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.home-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-profile-main {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
}

.home-hello {
  margin: 0;
  font-size: 13px;
  color: #8b95a5;
  font-weight: 600;
}

.home-name {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: #f4f7fb;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: #8b95a5;
}

.home-logout {
  margin-left: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 138, 128, 0.12) !important;
  color: #ff8a80 !important;
  font-size: 12px;
  font-weight: 700;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

/* 2-column cards without CSS Grid (old WebView safe) */
.home-actions {
  display: block;
  width: 100%;
  overflow: hidden;
}

.home-actions::after {
  content: "";
  display: table;
  clear: both;
}

.home-action {
  float: left;
  width: 48%;
  margin: 0 4% 12px 0;
  min-height: 148px;
  padding: 14px;
  text-align: left;
  background: #141c28 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  color: #f4f7fb;
  box-sizing: border-box;
  position: relative;
}

.home-action:nth-child(2n) {
  margin-right: 0;
}

.home-action:disabled {
  opacity: 0.6;
}

.home-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 14px;
}

.home-action-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #f4f7fb;
}

.home-action-sub {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: #8b95a5;
}

.home-msg {
  clear: both;
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #1faf84;
}

.home-err {
  clear: both;
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #ff8a80;
}

/* -------- Bottom nav -------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 8px 12px 12px;
  box-sizing: border-box;
}

.bottom-nav-inner {
  max-width: 480px;
  margin: 0 auto;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: stretch;
  -webkit-align-items: stretch;
  align-items: stretch;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141c28;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.bottom-nav-link {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 8px 4px;
  margin: 0 2px;
  border-radius: 12px;
  text-decoration: none;
  color: #8b95a5;
  font-size: 10px;
  font-weight: 600;
}

.bottom-nav-link.is-active {
  background: rgba(75, 139, 245, 0.18);
  color: #4b8bf5;
}

.bottom-nav-link span {
  margin-top: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* -------- Profile -------- */
.profile-card {
  padding: 16px;
  margin-bottom: 12px;
  background: #141c28;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
}

.profile-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.profile-signout {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #e74c3c !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
}

/* QR reader */
#pdks-qr-reader,
#pdks-qr-reader video {
  width: 100% !important;
  border: 0 !important;
}

#pdks-qr-reader img[alt="Info icon"] {
  display: none !important;
}

