/* DailyWin Deposit — YaarWin layout + DailyWin DARK theme (no light flash) */
#dw-deposit-root {
  --dw-gold: #EDD188;
  --dw-gold-2: #C79744;
  --dw-gold-3: #CA9D4B;
  --dw-brown: #8F5206;
  --dw-bg: #1a1c2e;
  --dw-panel: #252628;
  --dw-panel-2: #2a2d3a;
  --dw-line: #3A3D50;
  --dw-muted: #A8A5A1;
  --dw-text: #f0f0f0;
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: var(--dw-bg);
  display: none;
  flex-direction: column;
  font-family: "Manrope", "Roboto", system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--dw-text);
  overflow: hidden;
}
#dw-deposit-root.is-open { display: flex; }

/* Hide SPA instantly so dark app never flashes into light deposit */
html.dw-deposit-active #root,
html.dw-deposit-active #app {
  visibility: hidden !important;
  pointer-events: none !important;
}
html.dw-deposit-active,
html.dw-deposit-active body {
  background: #1a1c2e !important;
  overflow: hidden !important;
}

/* Header — dark */
.dw-dep-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: var(--dw-panel);
  flex-shrink: 0;
  border-bottom: 1px solid var(--dw-line);
  position: relative;
}
.dw-dep-back {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 6px;
  color: #fff;
  font-weight: 500;
  line-height: 1;
}
.dw-dep-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.dw-dep-hist {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--dw-gold);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
  white-space: nowrap;
}

.dw-dep-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 96px;
  -webkit-overflow-scrolling: touch;
  background: var(--dw-bg);
}

/* Balance card — team gold */
.dw-dep-bal {
  position: relative;
  border-radius: 14px;
  padding: 16px 16px 18px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #EDD188 0%, #C79744 55%, #B8860B 100%);
  color: #252628;
  overflow: hidden;
  min-height: 108px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.dw-dep-bal::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}
.dw-dep-bal-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #3a2a0a;
  margin-bottom: 8px;
}
.dw-dep-bal-ico {
  width: 18px;
  height: 18px;
  display: inline-flex;
  color: #3a2a0a;
}
.dw-dep-bal-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dw-dep-bal-amt {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: #1a1205;
}
.dw-dep-bal-refresh {
  border: none;
  background: rgba(37, 38, 40, 0.2);
  color: #1a1205;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.dw-dep-bal-dots {
  margin-top: 18px;
  font-size: 14px;
  letter-spacing: 0.28em;
  opacity: 0.75;
  font-weight: 700;
  color: #3a2a0a;
}

/* Payment methods */
.dw-dep-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.dw-dep-method {
  border: 1px solid var(--dw-line);
  background: var(--dw-panel);
  border-radius: 10px;
  padding: 10px 6px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 72px;
  color: #ddd;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.dw-dep-method .dw-dep-method-ico {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #1f2130;
  font-size: 13px;
  color: var(--dw-gold);
  font-weight: 800;
}
.dw-dep-method.active {
  background: linear-gradient(180deg, var(--dw-gold), var(--dw-gold-2));
  border-color: var(--dw-gold-2);
  color: var(--dw-brown);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.dw-dep-method.active .dw-dep-method-ico {
  background: rgba(37, 38, 40, 0.18);
  color: var(--dw-brown);
}
.dw-dep-method:disabled,
.dw-dep-method.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Section labels */
.dw-dep-sec { margin-bottom: 14px; }
.dw-dep-sec-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #eee;
}
.dw-dep-sec-head svg {
  color: var(--dw-gold);
  flex-shrink: 0;
}

/* Channel chip */
.dw-dep-channel {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(90deg, var(--dw-gold), var(--dw-gold-2));
  color: var(--dw-brown);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
.dw-dep-channel-name {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
}
.dw-dep-channel-range {
  display: block;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}

/* Amount grid */
.dw-dep-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.dw-dep-amt {
  border: 1px solid var(--dw-line);
  background: var(--dw-panel);
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  min-height: 44px;
  font-weight: 700;
  font-size: 14px;
  color: var(--dw-gold);
  line-height: 1.2;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.dw-dep-amt .rs {
  color: var(--dw-gold);
  font-weight: 700;
  margin-right: 2px;
}
.dw-dep-amt.active {
  border-color: var(--dw-gold-2);
  background: rgba(237, 209, 136, 0.16);
  color: var(--dw-gold);
  box-shadow: inset 0 0 0 1px rgba(199, 151, 68, 0.45);
}
.dw-dep-amt.active .rs { color: var(--dw-gold); }

.dw-dep-field {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--dw-line);
  background: #1f2130;
  border-radius: 999px;
  padding: 4px 10px 4px 14px;
  min-height: 44px;
  margin-top: 4px;
}
.dw-dep-field:focus-within { border-color: var(--dw-gold-2); }
.dw-dep-field-rs {
  color: var(--dw-gold);
  font-weight: 800;
  font-size: 16px;
  padding-right: 10px;
}
.dw-dep-field-div {
  width: 1px;
  height: 18px;
  background: var(--dw-line);
  margin-right: 10px;
}
.dw-dep-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
  padding: 8px 4px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}
.dw-dep-input::placeholder { color: #777; font-weight: 500; }
.dw-dep-clear {
  border: none;
  background: var(--dw-line);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.dw-dep-msg {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}
.dw-dep-msg.ok { background: rgba(237, 209, 136, 0.15); color: var(--dw-gold); }
.dw-dep-msg.err { background: rgba(237, 46, 55, 0.15); color: #ff6b6b; }

/* Sticky footer — dark */
.dw-dep-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--dw-panel);
  border-top: 1px solid var(--dw-line);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
}
.dw-dep-footer-meta { min-width: 0; flex: 1; }
.dw-dep-footer-label {
  font-size: 12px;
  color: var(--dw-muted);
  font-weight: 500;
}
.dw-dep-footer-method {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dw-dep-btn {
  flex: 0 0 auto;
  min-width: 42%;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  background: linear-gradient(90deg, var(--dw-gold), var(--dw-gold-2));
  color: var(--dw-brown);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.dw-dep-btn:disabled,
.dw-dep-btn.is-disabled {
  background: #3A3D50;
  color: #888;
  box-shadow: none;
  cursor: not-allowed;
}
.dw-dep-btn-secondary {
  width: 100%;
  margin-top: 10px;
  background: var(--dw-panel);
  color: var(--dw-gold);
  border: 1px solid var(--dw-gold-2);
  box-shadow: none;
}

/* Pay screen */
.dw-dep-card {
  background: var(--dw-panel);
  border-radius: 14px;
  padding: 16px 14px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--dw-line);
}
.dw-dep-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--dw-muted);
  margin-bottom: 6px;
}
.dw-dep-pay-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--dw-gold);
  margin-bottom: 8px;
}
.dw-dep-qr {
  text-align: center;
  margin: 12px 0;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
}
.dw-dep-qr img { width: min(260px, 80vw); height: auto; }
.dw-dep-apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.dw-dep-app {
  border: 1px solid var(--dw-line);
  background: #1f2130;
  border-radius: 10px;
  padding: 12px 6px;
  cursor: pointer;
  color: #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.dw-dep-app.active {
  border-color: var(--dw-gold-2);
  background: rgba(237, 209, 136, 0.14);
}
.dw-dep-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: #888;
  line-height: 1.4;
}
.dw-dep-empty {
  text-align: center;
  color: #888;
  padding: 24px 12px;
  font-size: 14px;
}
