:root {
  --ink: #1f2023;
  --ink-2: #5d6168;
  --ink-3: #9a9ea6;
  --bg: #eceef1;
  --line: #e7e9ed;
  --accent: #ffdb4d;
  --accent-hover: #ffd21f;
  --bad: #c62828;
  --bad-bg: #fde5e5;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.chrome-login {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #eceef1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.login {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: radial-gradient(900px 500px at 80% -10%, #fff3c4 0%, transparent 60%), #eceef1;
  color: #1f2023;
  font-size: 14px;
  line-height: 1.5;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
  text-align: center;
}
.login-logo { width: 44px; height: 48px; }
.login-brand h1 { font-size: 22px; font-weight: 650; margin: 12px 0 4px; letter-spacing: 0; }
.login-brand h1 span { font-weight: 650; }
.login-brand p { margin: 0 0 22px; }
.login-checking { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid #e7e9ed; border-top-color: #1f2023;
  animation: pay-spin .7s linear infinite;
}
@keyframes pay-spin { to { transform: rotate(360deg); } }
.login-tabs { display: flex; background: #f4f5f7; border-radius: 10px; padding: 3px; margin-bottom: 16px; }
.login-tab {
  flex: 1; height: 32px; border: 0; border-radius: 8px; background: none;
  color: var(--ink-2); font-size: 14px; font-weight: 500; line-height: 21px;
  padding: 1px 6px; cursor: pointer;
}
.login-tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.login-panel { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.login-panel p { margin: 0; }
.login-panel[data-panel="phone"] { width: 100%; align-items: stretch; }
.qr-box {
  position: relative; width: 232px; height: 232px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff;
}
.qr-box > #login-qr { width: 100%; height: 100%; display: grid; place-items: center; }
.qr-box > #login-qr img, .qr-box > #login-qr canvas, .qr-box > #login-qr svg {
  width: 100% !important; height: auto !important; display: block;
}
.qr-box.is-expired { background: #f3f4f6; }
.qr-box.is-expired > #login-qr canvas,
.qr-box.is-expired > #login-qr img,
.qr-box.is-expired > #login-qr svg { filter: grayscale(1); opacity: .34; }
.qr-expired-overlay {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 18px; border: 0; border-radius: inherit; background: rgba(255, 255, 255, .92);
  color: inherit; font: inherit; cursor: pointer;
}
.qr-expired-overlay[hidden] { display: none !important; }
.qr-expired-card { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.qr-expired-title { color: rgba(0, 0, 0, .88); font-size: 14px; line-height: 1.45; }
.qr-expired-action { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; color: #1677ff; font-size: 14px; }
.qr-expired-icon { width: 14px; height: 14px; display: inline-grid; }
.qr-expired-icon svg { width: 14px; height: 14px; display: block; }
.login-as {
  align-self: stretch; width: 100%; height: 36px; padding: 0 16px;
  border: 0; border-radius: 10px; background: var(--accent); color: #1b1b1b;
  font-size: 14px; font-weight: 500; cursor: pointer;
}
.login-as:hover { background: var(--accent-hover); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; border: 0; border-radius: 10px; background: #f4f5f7; font-weight: 500; cursor: pointer; }
.btn-primary { background: #ffdb4d; color: #1b1b1b; }
.btn-primary:hover { background: #ffd21f; }
.btn-block { width: 100%; }
.input {
  width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 12px; background: #fff; color: var(--ink);
}
.input:focus { outline: 2px solid #ffe58a; border-color: #f0d56a; }
.phone-field { position: relative; display: flex; width: 100%; align-items: stretch; text-align: left; }
.phone-dial {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px;
  background: #f4f5f7; color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer;
}
.phone-dial::after {
  content: ""; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .55;
}
.phone-flag { font-size: 18px; line-height: 1; }
.phone-code { font-variant-numeric: tabular-nums; }
.phone-field > .input { border-radius: 0 10px 10px 0; }
.phone-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px;
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(20, 24, 31, .16); z-index: 30; overflow: hidden;
}
.phone-search {
  width: calc(100% - 16px); margin: 8px; height: 40px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 14px;
}
.phone-menu-list { overflow: auto; padding-bottom: 6px; }
.phone-option {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none;
  padding: 8px 12px; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left;
}
.phone-option .name { flex: 1; }
.phone-option .dial { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.phone-option:hover, .phone-option.active { background: #f0f1f4; }
.phone-wait {
  padding: 12px 14px; border-radius: 12px; background: #fff4c2; border: 1px solid #f0d56a;
  color: #1b1b1b; font-size: 14.5px; font-weight: 650; line-height: 1.35;
}
.login-error { margin: 10px 0 0; color: var(--bad); background: var(--bad-bg); border-radius: 10px; padding: 10px; font-size: 13px; }
.login-foot { margin-top: 22px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.login-back {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px 0 8px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 600; box-shadow: 0 1px 2px rgba(20, 24, 31, .04);
}
.login-back svg { width: 16px; height: 16px; color: var(--ink-2); }
.login-back:hover { background: #f4f5f7; }
.login-foot .lang-picker-trigger {
  height: 36px; padding: 0 12px; background: #fff; color: var(--ink);
  border-color: var(--line); font-size: 14px; font-weight: 600; max-width: 168px;
}
