/* Withdraw modal styles aligned with deposit modal */
@media (prefers-reduced-motion: no-preference) {
  .cm-withdraw__panel {
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
  }
}
.cm-withdraw-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  opacity: 0;
  transition: opacity 180ms ease;
}
.cm-withdraw-overlay.cm-open {
  display: block;
  opacity: 1;
}
.cm-withdraw {
  position: fixed;
  inset: 0;
  z-index: 1410;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow: auto;
}
.cm-withdraw.cm-open {
  display: flex;
}
.cm-withdraw__panel {
  width: 100%;
  max-width: 720px;
  border-radius: 14px;
  border: 1px solid #163227;
  background: linear-gradient(180deg, #0f1512 0%, #0b0f0d 100%);
  color: #e6f3ec;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transform: translateY(-8px);
  opacity: 0;
}
.cm-withdraw.cm-open .cm-withdraw__panel {
  transform: translateY(0);
  opacity: 1;
}
.cm-withdraw__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px 16px;
}
.cm-withdraw__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.125rem;
  color: #d1fae5;
}
.cm-withdraw__subtitle {
  margin: 8px 16px 16px 16px;
  color: #94a3b8;
  font-size: 13px;
}
.cmw-form {
  padding: 0 16px 16px 16px;
  display: grid;
  gap: 16px;
}
.cmw-field {
  display: grid;
  gap: 8px;
}
.cmw-label {
  font-weight: 700;
  font-size: .9rem;
  color: #cbd5e1;
}
.cmw-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.85) 0%, rgba(15, 23, 42, 0.85) 100%);
  color: #e5e7eb;
}
.cmw-input::placeholder {
  color: #94a3b8;
}
.cmw-input:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.cmw-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cmw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #1f2937;
  cursor: pointer;
  font-weight: 700;
}
.cmw-btn--primary {
  background: #10b981;
  color: #071410;
  border-color: #10b981;
}
.cmw-btn--primary:hover {
  background: #059669;
}
.cmw-btn--outline {
  background: transparent;
  color: #d1fae5;
  border-color: #264a3a;
}
.cmw-error {
  color: #ef4444;
  font-weight: 800;
  font-size: 13px;
}
.cmw-note {
  color: #94a3b8;
  font-size: 12px;
}

/* Inline alert for server-controlled errors */
.cmw-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #3f1f23;
  background: #1a0f12;
  color: #fecaca;
  border-left: 4px solid #ef4444;
  padding: 12px;
  border-radius: 10px;
}
.cmw-alert .title {
  font-weight: 800;
  color: #fff;
}

/* Optional: keep for theme consistency; cm2-* rules live inline via JS to avoid race conditions. */
/* You can add theme overrides here if desired. */

/* Safety: nothing here should accidentally make hidden content visible. */
