/* ==========================================================================
 * auth.css — PolyCop Connect / account / deposit (6260)
 * Industrial anchor: pitch black, JetBrains Mono, flat (radius 0), 1px borders,
 * no shadow/glow, brand blue #2E5EFF. P/L colors untouched elsewhere.
 * Plain CSS only — precompiled Tailwind lacks arbitrary-value classes, so we
 * never depend on bg-[..]/z-[..]/max-h-[..] here.
 * ========================================================================== */

/* ---- header: Connect button (deterministic size, never context-scaled) ---- */
.auth-connect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
  background: #2E5EFF;
  border: 1px solid #2E5EFF;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s;
  flex: 0 0 auto;
}
.auth-connect-btn:hover { background: #1f4fe0; }
.auth-connect-btn svg { width: 15px; height: 15px; }

/* header: balance + avatar (logged in) */
.auth-controls { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.auth-balance { font-size: 14px; color: #fff; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .auth-balance { display: none; } }
.auth-avatar-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  font-size: 16px; line-height: 1;
  background: #2E5EFF; border: 1px solid #2E5EFF; border-radius: 0;
  cursor: pointer; transition: background 0.15s; flex: 0 0 auto;
}
.auth-avatar-btn:hover { background: #1f4fe0; }

/* ==========================================================================
 * Sheet pattern: mobile = bottom sheet (drag handle), desktop = centered card.
 * Used by connect + deposit. Account drawer is a desktop dropdown variant.
 * ========================================================================== */
.auth-sheet-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.66);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  /* mobile: dock children to the bottom */
  align-items: flex-end; justify-content: center;
}
.auth-sheet-backdrop.open { display: flex; }
@media (min-width: 768px) {
  .auth-sheet-backdrop { align-items: center; }
}

.auth-sheet {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #1f1f1f;
  border-bottom: none;
  display: flex; flex-direction: column;
  max-height: 88vh;
}
@media (min-width: 768px) {
  .auth-sheet {
    width: 380px;
    border-bottom: 1px solid #1f1f1f;
    max-height: calc(100vh - 80px);
  }
}
.auth-sheet-handle { display: flex; justify-content: center; padding: 10px 0 2px; }
.auth-sheet-handle > div { width: 36px; height: 3px; background: #3f3f46; }
@media (min-width: 768px) { .auth-sheet-handle { display: none; } }

.auth-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #1a1a1a;
}
.auth-sheet-title { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: 0.02em; }
.auth-sheet-close { width: 16px; height: 16px; color: #71717a; cursor: pointer; }
.auth-sheet-close:hover { color: #fff; }
.auth-sheet-body { padding: 20px; overflow-y: auto; }

/* ---- Google sign-in button (Industrial-framed, not a raw white slab) ---- */
.auth-google-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px;
  font-size: 13px; font-weight: 700;
  color: #fff;
  background: #111113;
  border: 1px solid #2a2a2a;
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.auth-google-btn:hover { border-color: #2E5EFF; background: #131418; }
.auth-google-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.auth-telegram-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px;
  margin-top: 10px;
  font-size: 13px; font-weight: 700;
  color: #fff;
  background: #111113;
  border: 1px solid #2a2a2a;
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.auth-telegram-btn:hover { border-color: #29B6F6; background: #131418; }
.auth-telegram-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.auth-note { font-size: 11px; color: #71717a; line-height: 1.55; margin-top: 16px; }
.auth-err { font-size: 11px; color: #fb7185; margin-top: 10px; display: none; }

/* ==========================================================================
 * Account drawer — desktop dropdown (top-right), mobile bottom sheet.
 * ========================================================================== */
.auth-drawer {
  display: none;
  position: fixed; z-index: 1001;
  flex-direction: column;
  background: #0a0a0a; border: 1px solid #1f1f1f;
  bottom: 0; left: 0; width: 100%; max-height: 82vh;
}
.auth-drawer.open { display: flex; }
@media (min-width: 768px) {
  .auth-drawer {
    bottom: auto; left: auto; top: 58px; right: 16px;
    width: 340px; max-height: calc(100vh - 80px);
  }
}
.auth-drawer-handle { display: flex; justify-content: center; padding: 10px 0 2px; }
.auth-drawer-handle > div { width: 36px; height: 3px; background: #3f3f46; }
@media (min-width: 768px) { .auth-drawer-handle { display: none; } }

.auth-acct-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid #1a1a1a;
}
.auth-acct-avatar {
  width: 42px; height: 42px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; background: #2E5EFF;
}
.auth-acct-id { font-size: 13px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-acct-email { font-size: 11px; color: #71717a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }

.auth-assets { padding: 16px 20px; border-bottom: 1px solid #1a1a1a; }
.auth-assets-label { font-size: 10px; color: #71717a; text-transform: uppercase; letter-spacing: 0.08em; }
.auth-assets-valrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.auth-assets-val { font-size: 24px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.auth-profile-link {
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  font-size: 12px; color: #2E5EFF; cursor: pointer; user-select: none; white-space: nowrap;
}
.auth-profile-link:hover { color: #1f4fe0; }
.auth-profile-link svg { width: 14px; height: 14px; flex: 0 0 auto; }
.auth-addr-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.auth-addr-label { font-size: 11px; color: #71717a; }
.auth-addr-row code { font-size: 11px; color: #d4d4d8; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-addr-copy { width: 14px; height: 14px; color: #71717a; cursor: pointer; flex-shrink: 0; }
.auth-addr-copy:hover { color: #fff; }

.auth-menu { overflow-y: auto; flex: 1; }
.auth-menu-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; text-align: left;
  background: transparent; border: none; border-bottom: 1px solid #1a1a1a;
  cursor: pointer; transition: background 0.15s;
}
.auth-menu-item:hover { background: rgba(255, 255, 255, 0.04); }
.auth-menu-item > svg:first-child { width: 18px; height: 18px; color: #2E5EFF; flex-shrink: 0; }
.auth-menu-label { flex: 1; font-size: 13px; color: #fff; }
.auth-menu-soon { font-size: 10px; color: #52525b; }
.auth-menu-chev { width: 15px; height: 15px; color: #52525b; flex-shrink: 0; }

.auth-disconnect {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 0; font-size: 13px; color: #a1a1aa;
  background: transparent; border: none; border-top: 1px solid #1a1a1a;
  cursor: pointer; transition: color 0.15s;
}
.auth-disconnect:hover { color: #fb7185; }
.auth-disconnect > svg { width: 15px; height: 15px; }

/* ---- deposit cards ---- */
.auth-dep-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.auth-dep-field { display: flex; flex-direction: column; gap: 5px; }
.auth-dep-field label { font-size: 10px; color: #71717a; text-transform: uppercase; letter-spacing: 0.07em; }
.auth-dep-select {
  height: 40px; padding: 0 10px;
  background: #111113; color: #fff;
  border: 1px solid #262626; border-radius: 0;
  font-family: inherit; font-size: 13px;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
  cursor: pointer;
}
.auth-dep-select:focus { outline: none; border-color: #2E5EFF; }
.auth-dep-addr-label { font-size: 10px; color: #71717a; text-transform: uppercase; letter-spacing: 0.07em; margin: 14px 0 6px; }
.auth-deposit-card { border: 1px solid #1a1a1a; padding: 14px; }
.auth-deposit-card + .auth-deposit-card { margin-top: 14px; }
.auth-deposit-label { font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.auth-deposit-hint { font-size: 11px; color: #71717a; margin-bottom: 12px; line-height: 1.5; }
.auth-deposit-qr { display: flex; justify-content: center; margin-bottom: 12px; }
.auth-deposit-addr { display: flex; align-items: center; gap: 8px; border: 1px solid #1a1a1a; padding: 8px; }
.auth-deposit-addr code { font-size: 11px; color: #d4d4d8; word-break: break-all; flex: 1; }
.auth-copy-ico { width: 16px; height: 16px; color: #71717a; cursor: pointer; flex-shrink: 0; }
.auth-copy-ico:hover { color: #fff; }
.auth-empty { font-size: 13px; color: #a1a1aa; }

/* ---- withdraw ---- */
.auth-wd-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.auth-wd-field > label { font-size: 10px; color: #71717a; text-transform: uppercase; letter-spacing: 0.07em; }
.auth-wd-input {
  height: 42px; padding: 0 12px; width: 100%; box-sizing: border-box;
  background: #111113; color: #fff; border: 1px solid #262626; border-radius: 0;
  font-family: inherit; font-size: 13px;
}
.auth-wd-input:focus { outline: none; border-color: #2E5EFF; }
.auth-wd-amtwrap {
  display: flex; align-items: center; gap: 0;
  background: #111113; border: 1px solid #262626; height: 42px; padding: 0 12px;
}
.auth-wd-amtwrap:focus-within { border-color: #2E5EFF; }
.auth-wd-amtwrap .auth-wd-input {
  flex: 1 1 auto; min-width: 0; height: 100%;
  background: transparent; border: 0; padding: 0;
}
.auth-wd-amtwrap .auth-wd-input:focus { border: 0; }
.auth-wd-unit {
  display: inline-flex; align-items: center; padding: 0 10px 0 8px;
  font-size: 12px; color: #a1a1aa; white-space: nowrap; flex: 0 0 auto;
}
.auth-wd-max {
  flex: 0 0 auto;
  font-family: inherit; font-size: 12px; line-height: 1; cursor: pointer;
  color: #2E5EFF; white-space: nowrap; user-select: none;
}
.auth-wd-max:hover { color: #1f4fe0; text-decoration: underline; }
.auth-wd-avail { font-size: 11px; color: #71717a; margin-top: 8px; }
.auth-wd-summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-top: 1px solid #1a1a1a; font-size: 12px; color: #a1a1aa;
}
.auth-wd-summary .v { color: #fff; font-weight: 600; }
.auth-wd-submit {
  width: 100%; height: 46px; margin-top: 4px;
  background: #2E5EFF; color: #fff; border: none; border-radius: 0;
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.auth-wd-submit:hover { background: #1f4fe0; }
.auth-wd-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-wd-msg { font-size: 12px; margin-top: 10px; min-height: 16px; text-align: center; }
.auth-wd-msg.err { color: #f43f5e; }
.auth-wd-msg.ok { color: #34d399; }

/* ---- totp bind ---- */
.totp-step { margin-bottom: 4px; }
.totp-hint { font-size: 11px; color: #71717a; margin-bottom: 14px; line-height: 1.5; }
.totp-qr-wrap { display: flex; justify-content: center; padding: 16px 0 8px; }
.totp-secret { font-size: 11px; color: #a1a1aa; text-align: center; letter-spacing: 0.1em; word-break: break-all; margin: 8px 0 16px; }
.totp-enabled { text-align: center; padding: 24px 0; }
.totp-enabled svg { color: #34d399; margin: 0 auto 12px; display: block; }
.totp-enabled .lbl { font-size: 13px; color: #d4d4d8; }
